diff options
author | Reid Kleckner <rnk@google.com> | 2019-07-30 22:49:11 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-07-30 22:49:11 +0000 |
commit | b4a7be0b1b8ad722545dc2cd3c6e418986ed0dd2 (patch) | |
tree | ed490bbbc621fe55fae25f365c74ffefe25c2fb4 /CMakeLists.txt | |
parent | b0f4ece035a170fd0710581ca383501effb3565e (diff) | |
download | compiler-rt-b4a7be0b1b8ad722545dc2cd3c6e418986ed0dd2.tar.gz |
Remove cmake checks for MSVC 1900 / VS 2013
Our minimum Visual C++ version is 19.10 from Visual Studio 2017.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@367362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f26ae25ad..f69d6b83e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |