aboutsummaryrefslogtreecommitdiffstats
path: root/build/ymake.core.conf
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-07-20 10:12:30 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-07-20 10:12:30 +0300
commit1b2504dbde60c815023eb3151505ebd955b0b8dc (patch)
tree023e9ce52fd51d1f024dc3f48d3f433cbd8f0ac6 /build/ymake.core.conf
parent9e49f01dad6a12a8bb3604e13784747e841f5759 (diff)
downloadydb-1b2504dbde60c815023eb3151505ebd955b0b8dc.tar.gz
Use profile from sources
Diffstat (limited to 'build/ymake.core.conf')
-rw-r--r--build/ymake.core.conf13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index d3468bbbc4..0de9e1c149 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -1132,6 +1132,14 @@ when ($ALLOCATOR == "LF") {
SANITIZE_HEADERS=yes
SANITIZER_CFLAGS=
+# 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:proto tag:grpc
_GRPC_ENABLED=no
@@ -1770,6 +1778,11 @@ module _LINK_UNIT: _BASE_UNIT {
LINK_SCRIPT_EXE_FLAGS += --dynamic-cuda
}
+ when ($NEED_PROFILE_RUNTIME && $NEED_PROFILE_RUNTIME != "no") {
+ LDFLAGS+=-resource-dir=contrib/libs/clang-rt
+ PEERDIR+=contrib/libs/clang14-rt/lib/profile
+ }
+
ENABLE(COMMON_LINK_SETTINGS)
CHECK_PROVIDES()
}