[compiler-rt] [compiler-rt] [CMake] Add option to disable sanitizer-common builds by default (PR #160962)

Andrew Haberlandt via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 07:15:56 PDT 2025


================
@@ -8,7 +8,7 @@ include(SanitizerUtils)
 # sanitizers or xray (or both).
 #
 #TODO: Refactor sanitizer_common into smaller pieces (e.g. flag parsing, utils).
-if (COMPILER_RT_HAS_SANITIZER_COMMON AND
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND COMPILER_RT_BUILD_SANITIZER_COMMON AND
     (COMPILER_RT_BUILD_SANITIZERS OR COMPILER_RT_BUILD_XRAY OR COMPILER_RT_BUILD_MEMPROF OR COMPILER_RT_BUILD_CTX_PROFILE))
----------------
ndrewh wrote:

For most of these projects, it is a dependency. So the list of ORed projects can be read as "if we are configuring these other projects we probably need sanitizer common too".

What we are trying to do here is NOT configure sanitizer-common when we do not need it. I think the PR description explains why it's so important that we do that.

https://github.com/llvm/llvm-project/pull/160962


More information about the llvm-commits mailing list