mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 06:40:18 +00:00
[compiler-rt] Exclude compiler-rt from using -fmodules when LLVM_ENABLE_MODULES=On
Sanitizers are intentionally not including system headers and often declare slightly different function prototypes, which is incompatible with -fmodules and -fcxx-modules. Let’s simply exclude compiler-rt from using -fmodules. Differential Revision: https://reviews.llvm.org/D25230 llvm-svn: 283658
This commit is contained in:
parent
e0bcdd4d25
commit
ab61c74f93
@ -205,6 +205,12 @@ elseif(MSVC)
|
||||
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Z[i7I]" "/Z7")
|
||||
endif()
|
||||
|
||||
if(LLVM_ENABLE_MODULES)
|
||||
# Sanitizers cannot be built with -fmodules. The interceptors intentionally
|
||||
# don't include system headers, which is incompatible with modules.
|
||||
list(APPEND SANITIZER_COMMON_CFLAGS -fno-modules)
|
||||
endif()
|
||||
|
||||
# Turn off several warnings.
|
||||
append_list_if(COMPILER_RT_HAS_WGNU_FLAG -Wno-gnu SANITIZER_COMMON_CFLAGS)
|
||||
append_list_if(COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG -Wno-variadic-macros SANITIZER_COMMON_CFLAGS)
|
||||
|
Loading…
Reference in New Issue
Block a user