[compiler-rt] [llvm] [LLVM][compiler-rt] Fix build with LLVM_USE_SANITIZER=Undefined (PR #120006)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 17:05:01 PST 2025


================
@@ -707,8 +709,17 @@ endif( LLVM_USE_PERF )
 set(LLVM_USE_SANITIZER "" CACHE STRING
   "Define the sanitizer used to build binaries and tests.")
 option(LLVM_OPTIMIZE_SANITIZED_BUILDS "Pass -O1 on debug sanitizer builds" ON)
+
+check_c_compiler_flag(-fno-sanitize=function C_SUPPORTS_FNO_SANITIZE_FUNCTION_FLAG)
+check_cxx_compiler_flag(-fno-sanitize=function CXX_SUPPORTS_FNO_SANITIZE_FUNCTION_FLAG)
----------------
vitalybuka wrote:

changes in llvm/ caused by unsupported flags
can you please extract them into a separate PR?

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


More information about the llvm-commits mailing list