mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CMake] Globally set sanitizer options Swift targets
For C/CXX targets, sanitizer options are set by 'CMAKE_{C|CXX}_FLAGS' in
HandleLLVMComfig.cmake. However for Swift targets, they are set for each
target. That caused some mismatch issues. Instead set them globally for
Swift targets too.
rdar://142516855
This commit is contained in:
@@ -1087,6 +1087,9 @@ endif()
|
||||
#
|
||||
swift_common_cxx_warnings()
|
||||
|
||||
# Set sanitizer options for Swift compiler.
|
||||
swift_common_sanitizer_config()
|
||||
|
||||
# Check if we're build with MSVC or Clang-cl, as these compilers have similar command line arguments.
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
|
||||
set(SWIFT_COMPILER_IS_MSVC_LIKE TRUE)
|
||||
|
||||
Reference in New Issue
Block a user