git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301017
91177308-0d34-0410-b5e6-
96231b3b80d8
include(CheckCXXSourceCompiles)
-CHECK_CXX_SOURCE_COMPILES("
- static thread_local int blah;
- int main() {
- return 0;
- }
- " HAS_THREAD_LOCAL)
+if( APPLE )
+ CHECK_CXX_SOURCE_COMPILES("
+ static thread_local int blah;
+ int main() {
+ return 0;
+ }
+ " HAS_THREAD_LOCAL)
-if( NOT HAS_THREAD_LOCAL )
+ if( NOT HAS_THREAD_LOCAL )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dthread_local=__thread")
+ endif()
endif()
set(LIBFUZZER_FLAGS_BASE "${CMAKE_CXX_FLAGS}")