[compiler-rt] r367362 - Remove cmake checks for MSVC 1900 / VS 2013

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 15:49:11 PDT 2019


Author: rnk
Date: Tue Jul 30 15:49:11 2019
New Revision: 367362

URL: http://llvm.org/viewvc/llvm-project?rev=367362&view=rev
Log:
Remove cmake checks for MSVC 1900 / VS 2013

Our minimum Visual C++ version is 19.10 from Visual Studio 2017.

Modified:
    compiler-rt/trunk/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=367362&r1=367361&r2=367362&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Tue Jul 30 15:49:11 2019
@@ -313,12 +313,11 @@ if(MSVC)
   endif()
   append_list_if(COMPILER_RT_HAS_Oy_FLAG /Oy- SANITIZER_COMMON_CFLAGS)
   append_list_if(COMPILER_RT_HAS_GS_FLAG /GS- SANITIZER_COMMON_CFLAGS)
-  # VS 2015 (version 1900) added support for thread safe static initialization.
-  # However, ASan interceptors run before CRT initialization, which causes the
-  # new thread safe code to crash. Disable this feature for now.
-  if (MSVC_VERSION GREATER 1899 OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-    list(APPEND SANITIZER_COMMON_CFLAGS /Zc:threadSafeInit-)
-  endif()
+
+  # Disable thread safe initialization for static locals. ASan shouldn't need
+  # it. Thread safe initialization assumes that the CRT has already been
+  # initialized, but ASan initializes before the CRT.
+  list(APPEND SANITIZER_COMMON_CFLAGS /Zc:threadSafeInit-)
 endif()
 
 append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 SANITIZER_COMMON_CFLAGS)




More information about the llvm-commits mailing list