[compiler-rt] 262e288 - [compiler-rt] Fix MSVC `/external` detection in cmake scripts

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 09:29:40 PDT 2023


Author: Alexandre Ganea
Date: 2023-10-02T12:29:28-04:00
New Revision: 262e2886b842666ae27b126275ffd9dbe9cdcd01

URL: https://github.com/llvm/llvm-project/commit/262e2886b842666ae27b126275ffd9dbe9cdcd01
DIFF: https://github.com/llvm/llvm-project/commit/262e2886b842666ae27b126275ffd9dbe9cdcd01.diff

LOG: [compiler-rt] Fix MSVC `/external` detection in cmake scripts

As suggested by https://reviews.llvm.org/D116872#4650507

Differential Revision: https://reviews.llvm.org/D116872

Added: 
    

Modified: 
    compiler-rt/lib/asan/CMakeLists.txt
    compiler-rt/lib/interception/CMakeLists.txt
    compiler-rt/lib/ubsan/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt
index bc5fe0be120f8d7..48d0e91052d73bb 100644
--- a/compiler-rt/lib/asan/CMakeLists.txt
+++ b/compiler-rt/lib/asan/CMakeLists.txt
@@ -92,7 +92,7 @@ append_rtti_flag(OFF ASAN_CFLAGS)
 
 # Silence warnings in system headers with MSVC.
 if(NOT CLANG_CL)
-  append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external /external:W0 /external:anglebrackets" ASAN_CFLAGS)
+  append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external;/external:W0;/external:anglebrackets" ASAN_CFLAGS)
 endif()
 
 # Too many existing bugs, needs cleanup.

diff  --git a/compiler-rt/lib/interception/CMakeLists.txt b/compiler-rt/lib/interception/CMakeLists.txt
index 3242cf50e35f860..abe9229340be7a1 100644
--- a/compiler-rt/lib/interception/CMakeLists.txt
+++ b/compiler-rt/lib/interception/CMakeLists.txt
@@ -21,7 +21,7 @@ append_rtti_flag(OFF INTERCEPTION_CFLAGS)
 
 # Silence warnings in system headers with MSVC.
 if(NOT CLANG_CL)
-  append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external /external:W0 /external:anglebrackets" INTERCEPTION_CFLAGS)
+  append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external;/external:W0;/external:anglebrackets" INTERCEPTION_CFLAGS)
 endif()
 
 add_compiler_rt_object_libraries(RTInterception

diff  --git a/compiler-rt/lib/ubsan/CMakeLists.txt b/compiler-rt/lib/ubsan/CMakeLists.txt
index 2031726afe0b59d..3f1e12ed9ac66fc 100644
--- a/compiler-rt/lib/ubsan/CMakeLists.txt
+++ b/compiler-rt/lib/ubsan/CMakeLists.txt
@@ -57,7 +57,7 @@ append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI UBSAN_CXXFLAGS)
 
 # Silence warnings in system headers with MSVC.
 if(NOT CLANG_CL)
-  append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external /external:W0 /external:anglebrackets" UBSAN_CXXFLAGS)
+  append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external;/external:W0;/external:anglebrackets" UBSAN_CXXFLAGS)
 endif()
 
 set(UBSAN_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})


        


More information about the llvm-commits mailing list