[PATCH] D25157: [compiler-rt] [cmake] Respect COMPILER_RT_BUILD_* for libs, headers and tests

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 29 11:18:22 PDT 2017


compnerd added inline comments.


================
Comment at: cmake/config-ix.cmake:438-441
 if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
+    (COMPILER_RT_BUILD_SANITIZERS OR COMPILER_RT_BUILD_XRAY) AND
     (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR
     (OS_NAME MATCHES "Windows" AND (NOT MINGW AND NOT CYGWIN))))
----------------
What does this really leave in terms of targets which the sanitizer supports but doesn't have the common library?


================
Comment at: cmake/config-ix.cmake:562
   set(COMPILER_RT_HAS_XRAY FALSE)
 endif()
----------------
Seems like it might be a good time to hoist the OS checks and add a `COMPILER_RT_*_SUPPORTED` macro (e.g. `COMPILER_RT_XRAY_SUPPORTED`).


================
Comment at: lib/CMakeLists.txt:60
+# the following set is conditional to COMPILER_RT_BUILD_XRAY
+# (via COMPILER_RT_HAS_* in config-ix.cmake)
+compiler_rt_build_runtime(xray)
----------------
Im not sure I understand the comment.  This looks like it may prevent disabling X-ray?


https://reviews.llvm.org/D25157





More information about the cfe-commits mailing list