diff options
author | prettyboy <prettyboy@yandex-team.com> | 2023-08-18 11:46:03 +0300 |
---|---|---|
committer | prettyboy <prettyboy@yandex-team.com> | 2023-08-18 14:48:39 +0300 |
commit | 66149805acb62a8f0828a414e9c3362d0f532e2f (patch) | |
tree | 4f669234172185267cd8d80d0c597e999acc017c | |
parent | 4b336ed3cc9479b9b99783e9967c7d4ef47d7c96 (diff) | |
download | ydb-66149805acb62a8f0828a414e9c3362d0f532e2f.tar.gz |
Revert commit rXXXXXX, Make libclang.rt_profile depends on sources
-rw-r--r-- | build/conf/linkers/ld.conf | 33 | ||||
-rw-r--r-- | build/scripts/copy_clang_profile_rt.py | 42 | ||||
-rw-r--r-- | build/scripts/ya.make | 1 | ||||
-rw-r--r-- | build/ymake.core.conf | 15 |
4 files changed, 5 insertions, 86 deletions
diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf index 8ad41c57ef..090328de1d 100644 --- a/build/conf/linkers/ld.conf +++ b/build/conf/linkers/ld.conf @@ -191,9 +191,8 @@ LINK_SCRIPT_EXE_FLAGS= REAL_LINK_EXE_CMDLINE =\ $YMAKE_PYTHON ${input:"build/scripts/link_exe.py"} \ --source-root $ARCADIA_ROOT - -REAL_LINK_EXE_CMDLINE+=$_LD_LINKER_OUTPUT -REAL_LINK_EXE_CMDLINE+=\ + REAL_LINK_EXE_CMDLINE+=$_LD_LINKER_OUTPUT + REAL_LINK_EXE_CMDLINE+=\ ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \ ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \ $_LD_ARCH_FLAG \ @@ -213,15 +212,6 @@ REAL_LINK_EXE_TIDY=\ $AUTO_INPUT \ $_LD_ENV_STYLE -COPY_PROFILE_RUNTIME=\ - $YMAKE_PYTHON3 ${input:"build/scripts/copy_clang_profile_rt.py"} \ - --arch $TARGET_PLATFORM \ - --build-root $ARCADIA_BUILD_ROOT \ - --need-profile-rt $NEED_PROFILE_RUNTIME -- -COPY_PROFILE_RUNTIME+=\ - ${rootrel:PEERS} \ - $LDFLAGS - # Executable Shared Library REAL_LINK_EXEC_DYN_LIB_CMDLINE =\ @@ -281,23 +271,8 @@ otherwise { DWARF_COMMAND=$_DWARF_COMMAND _REAL_LINK_EXE=$REAL_LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) -_LINK_EXE= -_LINK_EXE+=$GENERATE_MF -_LINK_EXE+=&& $GENERATE_VCS_C_INFO_NODEP -_LINK_EXE+=&& $COPY_PROFILE_RUNTIME -_LINK_EXE+=&& $REAL_LINK_EXE -_LINK_EXE+=&& $DWARF_COMMAND -_LINK_EXE+=&& $LINK_ADDITIONAL_SECTIONS_COMMAND -_LINK_EXE+=&& $PACK_IOS_CMD - -_LINK_DYN_LIB= -_LINK_DYN_LIB+=$GENERATE_MF -_LINK_DYN_LIB+=&& $GENERATE_VCS_C_INFO_NODEP -_LINK_DYN_LIB+=&& $COPY_PROFILE_RUNTIME -_LINK_DYN_LIB+=&& $REAL_LINK_DYN_LIB -_LINK_DYN_LIB+=&& $DWARF_COMMAND -_LINK_DYN_LIB+=&& $LINK_ADDITIONAL_SECTIONS_COMMAND - +_LINK_EXE=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_EXE && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND && $PACK_IOS_CMD +_LINK_DYN_LIB=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND when ($TIDY == "yes") { _REAL_LINK_EXE=$REAL_LINK_EXE_TIDY _LINK_EXE=$REAL_LINK_EXE 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) diff --git a/build/scripts/ya.make b/build/scripts/ya.make index 5448ec7db8..69a7bd572d 100644 --- a/build/scripts/ya.make +++ b/build/scripts/ya.make @@ -102,7 +102,6 @@ ELSEIF(PY3) TEST_SRCS( build_info_gen.py - copy_clang_profile_rt.py gen_yql_python_udf.py ) ENDIF() diff --git a/build/ymake.core.conf b/build/ymake.core.conf index f94ae435b7..0b202d75eb 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -9,7 +9,7 @@ FAKEID=314159265358 SANDBOX_FAKEID=${FAKEID}.7600000 -CPP_FAKEID=2023-08-18 +CPP_FAKEID=2023-06-06 GO_FAKEID=11100371 ANDROID_FAKEID=2023-05-17 CLANG_TIDY_FAKEID=2023-06-06 @@ -408,14 +408,6 @@ when ($ALLOCATOR == "LF") { MSVC_DYNAMICBASE=/DYNAMICBASE:NO } -# tag:profile -NEED_PROFILE_RUNTIME=no -when ($BUILD_TYPE == "PROFILE" || $BUILD_TYPE == "COVERAGE" || ($CLANG_COVERAGE && $CLANG_COVERAGE != "no")) { - when($CLANG && ($TARGET_PLATFORM == "LINUX" || $TARGET_PLATFORM == "DARWIN")) { - NEED_PROFILE_RUNTIME=yes - } -} - # tag:sanitize SANITIZER_CFLAGS= @@ -610,11 +602,6 @@ module _BASE_UNIT: _BARE_UNIT { } } - when ($NEED_PROFILE_RUNTIME && $NEED_PROFILE_RUNTIME != "no") { - LDFLAGS+=-resource-dir=contrib/libs/clang-rt - PEERDIR+=contrib/libs/clang14-rt/lib/profile - } - when ($COMPILER_PLATFORM && $NEED_PLATFORM_PEERDIRS == "yes") { PEERDIR+=$COMPILER_PLATFORM } |