Skip to content

Commit 490a004

Browse files
committed
Only set sanitizers flag when arlib is top level
1 parent f0d65a0 commit 490a004

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ endif()
119119
# on release builds we never enable sanitizers, unless explicitely asked for.
120120
# on debug builds, we add them (asan on windows, asan+ubsan+leaksan on linux,
121121
# except when using clang-cl because clang-cl doesn't like asan in debug builds)
122-
if ((DEBUG_BUILD OR ARLIB_FORCE_SANITIZERS) AND NOT ARLIB_DEBUG_NEW_DELETE)
122+
if (((DEBUG_BUILD AND ARLIB_TOP_LEVEL) OR ARLIB_FORCE_SANITIZERS) AND NOT ARLIB_DEBUG_NEW_DELETE)
123123
if (ON_WINDOWS AND ON_CLANG)
124124
message(STATUS "Clang doesn't like debug libraries + asan")
125125
set(ARLIB_SANITIZERS_FLAGS "")

0 commit comments

Comments
 (0)