Make sure that if SCUDO_DEBUG=1 in tests
then we had the same in the scudo
library itself.
Reviewed By: cryptoad, hctim
Differential Revision: https://reviews.llvm.org/D103061
append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SCUDO_CFLAGS)
if(COMPILER_RT_DEBUG)
- list(APPEND SCUDO_CFLAGS -O0)
+ list(APPEND SCUDO_CFLAGS -O0 -DSCUDO_DEBUG=1)
else()
list(APPEND SCUDO_CFLAGS -O3)
endif()
-I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone
-I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone/include
-DGTEST_HAS_RTTI=0
- -DSCUDO_DEBUG=1
-g
# Extra flags for the C++ tests
# TODO(kostyak): find a way to make -fsized-deallocation work
-Wno-mismatched-new-delete)
+if(COMPILER_RT_DEBUG)
+ list(APPEND SCUDO_UNITTEST_CFLAGS -DSCUDO_DEBUG=1)
+endif()
+
if(ANDROID)
list(APPEND SCUDO_UNITTEST_CFLAGS -fno-emulated-tls)
endif()