summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2022-02-25 00:23:54 +0300
committerthegeorg <[email protected]>2022-02-25 00:23:54 +0300
commit207b28a6021793cec36893b859eb01c76434e6b1 (patch)
tree406ddff6e841c13450a4c798f68e4fbebb57c3b4 /util
parent9e08dc29988aa927698e62abd83d0930c730c464 (diff)
Implement SRC_CPP_NO_LTO and use it util/
`-flto` / `-fno-lto` is not available in clang-cl, so we should not use it in order to prevent `-Wunknown-argument` from being triggered Raw CFLAGS are not user-friendly, we should define a better macro for thi (somewhat popular) case. ref:6f969138dc8b6fe4c420eb2ef4c0e50c2503d184
Diffstat (limited to 'util')
-rw-r--r--util/CMakeLists.txt8
-rw-r--r--util/ya.make2
2 files changed, 1 insertions, 9 deletions
diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
index f0d69c200d4..bb987296548 100644
--- a/util/CMakeLists.txt
+++ b/util/CMakeLists.txt
@@ -19,14 +19,6 @@ target_sources(yutil PRIVATE
${CMAKE_SOURCE_DIR}/util/system/valgrind.cpp
${CMAKE_SOURCE_DIR}/util/system/mktemp_system.cpp
)
-set_property(
- SOURCE
- ${CMAKE_SOURCE_DIR}/util/system/compiler.cpp
- APPEND
- PROPERTY
- COMPILE_OPTIONS
- -fno-lto
-)
target_joined_source(yutil
all_datetime.cpp
${CMAKE_SOURCE_DIR}/util/datetime/base.cpp
diff --git a/util/ya.make b/util/ya.make
index ab341247743..523c80a17db 100644
--- a/util/ya.make
+++ b/util/ya.make
@@ -329,7 +329,7 @@ JOIN_SRCS(
system/yield.cpp
)
-SRC(system/compiler.cpp -fno-lto)
+SRC_CPP_NO_LTO(system/compiler.cpp)
IF (OS_WINDOWS)
SRCS(