diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2023-08-22 11:29:21 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2023-08-22 12:10:26 +0300 |
commit | b83892f362596c907029f97068a54d1c8b8c0fb4 (patch) | |
tree | bf006f929fd6e2b6136877817d7e2bed0f990e66 /build/conf | |
parent | f10bc4e5bd07c8e5293d63f09e50e0d5f8e2902f (diff) | |
download | ydb-b83892f362596c907029f97068a54d1c8b8c0fb4.tar.gz |
Make libclang.rt_profile depends on sources again
Diffstat (limited to 'build/conf')
-rw-r--r-- | build/conf/go.conf | 29 | ||||
-rw-r--r-- | build/conf/linkers/ld.conf | 24 |
2 files changed, 45 insertions, 8 deletions
diff --git a/build/conf/go.conf b/build/conf/go.conf index 9e338c3d4f..664ebd95cc 100644 --- a/build/conf/go.conf +++ b/build/conf/go.conf @@ -235,10 +235,26 @@ macro _GO_LINK_TEST_IMPL(CGO_FILES[], EXTRA_INPUTS[], EXTRA_TEXT_INPUTS[], GO_TE } # tag:go-specific -GO_LINK_LIB=$GENERATE_MF && $_GO_LINK_LIB_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS) -GO_LINK_EXE=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $GENERATE_VCS_GO_INFO_NODEP && $_GO_LINK_EXE_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS) -GO_LINK_TEST=$GENERATE_VCS_C_INFO_NODEP && $GENERATE_VCS_GO_INFO_NODEP && $_GO_LINK_TEST_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS GO_TEST_FILES $_GO_TEST_SRCS_VALUE GO_XTEST_FILES $_GO_XTEST_SRCS_VALUE) -GO_LINK_DLL=$GO_LINK_EXE && $COPY_CMD $BINDIR/_cgo_export.h ${output;pre=${MODULE_PREFIX};suf=.h:REALPRJNAME} +GO_LINK_LIB= +GO_LINK_LIB+=$GENERATE_MF +GO_LINK_LIB+=&& $_GO_LINK_LIB_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS) + +GO_LINK_EXE= +GO_LINK_EXE+=$GENERATE_MF +GO_LINK_EXE+=&& $GENERATE_VCS_C_INFO_NODEP +GO_LINK_EXE+=&& $GENERATE_VCS_GO_INFO_NODEP +GO_LINK_EXE+=&& $COPY_PROFILE_RUNTIME +GO_LINK_EXE+=&& $_GO_LINK_EXE_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS) + +GO_LINK_TEST= +GO_LINK_TEST+=$GENERATE_VCS_C_INFO_NODEP +GO_LINK_TEST+=&& $GENERATE_VCS_GO_INFO_NODEP +GO_LINK_TEST+=&& $COPY_PROFILE_RUNTIME +GO_LINK_TEST+=&& $_GO_LINK_TEST_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS GO_TEST_FILES $_GO_TEST_SRCS_VALUE GO_XTEST_FILES $_GO_XTEST_SRCS_VALUE) + +GO_LINK_DLL= +GO_LINK_DLL+=$GO_LINK_EXE +GO_LINK_DLL+=&& $COPY_CMD $BINDIR/_cgo_export.h ${output;pre=${MODULE_PREFIX};suf=.h:REALPRJNAME} # tag:go-specific CGO_ENABLED=yes @@ -849,6 +865,11 @@ module GO_PROGRAM: _GO_BASE_UNIT { when ($HARDENING == "yes") { _GO_BUILDMODE=++buildmode=pie } + + when ($NEED_PROFILE_RUNTIME == "yes") { + LDFLAGS+=-resource-dir=contrib/libs/clang-rt + PEERDIR+=contrib/libs/clang14-rt/lib/profile + } } # tag:go-specific diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf index 090328de1d..e2cf0d0b2e 100644 --- a/build/conf/linkers/ld.conf +++ b/build/conf/linkers/ld.conf @@ -191,8 +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 \ @@ -271,8 +271,24 @@ 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 |