aboutsummaryrefslogtreecommitdiffstats
path: root/build/ymake.core.conf
diff options
context:
space:
mode:
authorhiddenpath <hiddenpath@yandex-team.com>2023-08-22 11:29:21 +0300
committerhiddenpath <hiddenpath@yandex-team.com>2023-08-22 12:10:26 +0300
commitb83892f362596c907029f97068a54d1c8b8c0fb4 (patch)
treebf006f929fd6e2b6136877817d7e2bed0f990e66 /build/ymake.core.conf
parentf10bc4e5bd07c8e5293d63f09e50e0d5f8e2902f (diff)
downloadydb-b83892f362596c907029f97068a54d1c8b8c0fb4.tar.gz
Make libclang.rt_profile depends on sources again
Diffstat (limited to 'build/ymake.core.conf')
-rw-r--r--build/ymake.core.conf26
1 files changed, 26 insertions, 0 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 5f8582ae76..d336b2abab 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -132,6 +132,27 @@ otherwise {
TIDY_VALUE=
}
+# tag:profile
+NEED_PROFILE_RUNTIME=no
+when ($BUILD_TYPE == "PROFILE" || $BUILD_TYPE == "COVERAGE" || ($CLANG_COVERAGE && $CLANG_COVERAGE != "no") || $GCOV_COVERAGE == "yes") {
+ when($CLANG && ($TARGET_PLATFORM == "LINUX" || $TARGET_PLATFORM == "DARWIN")) {
+ NEED_PROFILE_RUNTIME=yes
+ }
+}
+
+when ($NEED_PROFILE_RUNTIME == "yes") {
+ COPY_PROFILE_RUNTIME=\
+ $YMAKE_PYTHON3 ${input:"build/scripts/copy_clang_profile_rt.py"} \
+ --arch $TARGET_PLATFORM \
+ --build-root $ARCADIA_BUILD_ROOT --
+ COPY_PROFILE_RUNTIME+=\
+ ${rootrel:PEERS} \
+ $LDFLAGS
+}
+otherwise {
+ COPY_PROFILE_RUNTIME=
+}
+
# tag:codenav
when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
PY_PROGRAM_LINK_EXE=$LINK_EXE ${kv;hide:"pyndex $TARGET"}
@@ -935,6 +956,11 @@ module _LINK_UNIT: _BASE_UNIT {
PEERDIR += contrib/libs/cxxsupp
}
+ when ($NEED_PROFILE_RUNTIME == "yes") {
+ LDFLAGS+=-resource-dir=contrib/libs/clang-rt
+ PEERDIR+=contrib/libs/clang14-rt/lib/profile
+ }
+
when ($USE_LIBCXXRT == "yes") {
PEERDIR += contrib/libs/cxxsupp/libcxxrt
}