diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2023-07-20 10:12:30 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2023-07-20 10:12:30 +0300 |
commit | 1b2504dbde60c815023eb3151505ebd955b0b8dc (patch) | |
tree | 023e9ce52fd51d1f024dc3f48d3f433cbd8f0ac6 /build/conf | |
parent | 9e49f01dad6a12a8bb3604e13784747e841f5759 (diff) | |
download | ydb-1b2504dbde60c815023eb3151505ebd955b0b8dc.tar.gz |
Use profile from sources
Diffstat (limited to 'build/conf')
-rw-r--r-- | build/conf/linkers/ld.conf | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf index 2ec22beff0..44d8a1a07c 100644 --- a/build/conf/linkers/ld.conf +++ b/build/conf/linkers/ld.conf @@ -191,8 +191,9 @@ 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 \ @@ -212,6 +213,17 @@ REAL_LINK_EXE_TIDY=\ $AUTO_INPUT \ $_LD_ENV_STYLE +PROFILE_RUNTIME_ARGS_END=end_of_args +COPY_PROFILE_RUNTIME=\ + $YMAKE_PYTHON3 ${input:"build/scripts/clang_profile.py"} \ + --arch $TARGET_PLATFORM \ + --build-root $ARCADIA_BUILD_ROOT \ + --need-profile-runtime $NEED_PROFILE_RUNTIME \ + $PROFILE_RUNTIME_ARGS_END +COPY_PROFILE_RUNTIME+=\ + ${rootrel:PEERS} \ + $LDFLAGS + # Executable Shared Library REAL_LINK_EXEC_DYN_LIB_CMDLINE =\ @@ -271,8 +283,23 @@ otherwise { DWARF_COMMAND=$_DWARF_COMMAND _REAL_LINK_EXE=$REAL_LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) -_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 +_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 + when ($TIDY == "yes") { _REAL_LINK_EXE=$REAL_LINK_EXE_TIDY _LINK_EXE=$REAL_LINK_EXE |