aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/copy_clang_profile_rt.py
diff options
context:
space:
mode:
authorprettyboy <prettyboy@yandex-team.com>2023-08-18 11:46:03 +0300
committerprettyboy <prettyboy@yandex-team.com>2023-08-18 14:48:39 +0300
commit66149805acb62a8f0828a414e9c3362d0f532e2f (patch)
tree4f669234172185267cd8d80d0c597e999acc017c /build/scripts/copy_clang_profile_rt.py
parent4b336ed3cc9479b9b99783e9967c7d4ef47d7c96 (diff)
downloadydb-66149805acb62a8f0828a414e9c3362d0f532e2f.tar.gz
Revert commit rXXXXXX, Make libclang.rt_profile depends on sources
Diffstat (limited to 'build/scripts/copy_clang_profile_rt.py')
-rw-r--r--build/scripts/copy_clang_profile_rt.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/build/scripts/copy_clang_profile_rt.py b/build/scripts/copy_clang_profile_rt.py
deleted file mode 100644
index b24dde3959..0000000000
--- a/build/scripts/copy_clang_profile_rt.py
+++ /dev/null
@@ -1,42 +0,0 @@
-import optparse
-import os
-import shutil
-
-import process_command_files as pcf
-
-CLANG_RT_VERSION = 14
-
-
-def copy_clang_rt_profile(cmd, build_root, arch) -> None:
- profile_rt_lib = None
- resource_dir = None
-
- for arg in cmd:
- if arg.startswith(f'contrib/libs/clang{CLANG_RT_VERSION}-rt/lib/profile/libclang_rt.profile'):
- profile_rt_lib = arg
- if arg.startswith('-resource-dir='):
- resource_dir = arg[len('-resource-dir='):]
-
- profile_rt_path = os.path.join(build_root, profile_rt_lib)
- profile_name = os.path.basename(profile_rt_path)
-
- dst_dir = os.path.join(build_root, resource_dir, 'lib/{}'.format(arch.lower()))
- os.makedirs(dst_dir, exist_ok=True)
- shutil.copy(profile_rt_path, 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-rt')
- return parser.parse_args()
-
-
-if __name__ == '__main__':
- opts, args = parse_args()
- args = pcf.skip_markers(args)
-
- if opts.need_profile_rt != "no":
- copy_clang_rt_profile(args, opts.build_root, opts.arch)