[PATCH] D29783: Add cmake build support for lsan on OS X

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 14:45:45 PST 2017


kubamracek added inline comments.


================
Comment at: cmake/config-ix.cmake:167-171
+if(APPLE)
+  set(ALL_LSAN_SUPPORTED_ARCH ${X86_64} ${ARM64})
+else()
+  set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})
+endif()
----------------
Why exactly do we need this change?  Will the 32-bit x86 slice fail to build?


================
Comment at: lib/lsan/CMakeLists.txt:19-21
+if(APPLE AND COMPILER_RT_HAS_LSAN)
+  set(LSAN_CFLAGS ${LSAN_CFLAGS} -DCAN_SANITIZE_LEAKS_MAC=1)
+endif()
----------------
How about we just unconditionally propagate `CAN_SANITIZE_LEAKS` (no `_MAC`) and remove that ugly ifdef in lsan_common.h?

Doesn't this also need to go to lib/asan/CMakeLists.txt?


https://reviews.llvm.org/D29783





More information about the llvm-commits mailing list