aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornechda <nechda@yandex-team.com>2024-03-22 13:43:55 +0300
committernechda <nechda@yandex-team.com>2024-03-22 14:08:31 +0300
commit37f07e5161d87439118d51f28cec342b7a26e3b8 (patch)
treea06601f0f397ce8a154d3383fd040e434efb17d9
parent8b9102febf7970f7f99133958de9b0f3ae644fc8 (diff)
downloadydb-37f07e5161d87439118d51f28cec342b7a26e3b8.tar.gz
Add macro for lld option
e07e76d0cc1c97167e75195f5255edcec12791dd
-rw-r--r--build/ymake.core.conf16
1 files changed, 16 insertions, 0 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 5675e5bc81..d1835127b4 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -137,6 +137,22 @@ when ($USE_PREBUILT_TOOLS == "yes") {
}
}
+### @usage: FUNCTION_ORDERING_FILE(VAR_NAME)
+###
+### Select file for function reordering. Works only with lld linker.
+### VAR_NAME should be the same value that was passed into DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE library.
+macro FUNCTION_ORDERING_FILE(ORDERING_FILE) {
+ select ($_LINKER_ID) {
+ "lld" ? {
+ }
+ default ? {
+ _OK = no
+ }
+ }
+ ASSERT(_OK FUNCTION_ORDERING_FILE macro can be used only with `lld` linker, but you chose `$_LINKER_ID`.)
+ LDFLAGS("-Wl,--symbol-ordering-file=${suf=_RESOURCE_GLOBAL/funcs.ord;pre=$:ORDERING_FILE}")
+}
+
### @usage: SELECT_CLANG_SA_CONFIG(static_analyzer.yaml)
###
### Select config file for clang static analyzer.