diff options
author | thegeorg <thegeorg@yandex-team.com> | 2023-07-21 12:24:53 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2023-07-21 12:24:53 +0300 |
commit | d8bf44488de42e74f19a724f685c6e9dde6a7239 (patch) | |
tree | 29a90da887beea78a5811a7f8194ad31e474e99d /build/scripts/clang_profile.py | |
parent | 4e61cae929165ef52b951130a966f2c9ba5319bd (diff) | |
download | ydb-d8bf44488de42e74f19a724f685c6e9dde6a7239.tar.gz |
Do not use libprofile.a from sources
```
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
Failed
```
Diffstat (limited to 'build/scripts/clang_profile.py')
-rw-r--r-- | build/scripts/clang_profile.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/build/scripts/clang_profile.py b/build/scripts/clang_profile.py deleted file mode 100644 index a47149d8351..00000000000 --- a/build/scripts/clang_profile.py +++ /dev/null @@ -1,45 +0,0 @@ -import fnmatch -import shutil -import optparse -import os - -import process_command_files as pcf - -def copy_clang_rt_profile(cmd, build_root, arch): - profile_path = None - resource_dir_path = None - - for flag in cmd: - if fnmatch.fnmatch(flag, 'contrib/libs/clang14-rt/lib/profile/libclang_rt.profile-*.a'): - profile_path = flag - if flag.startswith('-resource-dir='): - resource_dir_path = flag[len('-resource-dir='):] - - lib_profile = os.path.join(build_root, profile_path) - profile_name = os.path.basename(lib_profile) - - if arch == 'DARWIN': - dst_dir = os.path.join(build_root, resource_dir_path, 'lib/darwin') - - if arch == 'LINUX': - dst_dir = os.path.join(build_root, resource_dir_path, 'lib/linux') - - os.makedirs(dst_dir, exist_ok=True) - shutil.copy(lib_profile, os.path.join(dst_dir, profile_name)) - - -def parse_args(): - parser = optparse.OptionParser() - parser.disable_interspersed_args() - parser.add_option('--build-root') - parser.add_option('--arch') - parser.add_option('--need-profile-runtime') - return parser.parse_args() - - -if __name__ == '__main__': - opts, args = parse_args() - args = pcf.skip_markers(args) - - if opts.need_profile_runtime != "no": - copy_clang_rt_profile(args, opts.build_root, opts.arch) |