From: Andres Noetzli Date: Tue, 10 Aug 2021 20:04:21 +0000 (-0700) Subject: Disable external initialization of `thread_local` variables (#7004) X-Git-Tag: cvc5-1.0.0~1389 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dac8b872572f0ac9c9e0be93f5058d7b8b9cea91;p=cvc5.git Disable external initialization of `thread_local` variables (#7004) This commit adds `-fno-extern-tls-init` to the list of compiler flags to tell the compiler that it can assume that there is no dynamic initialization of thread-local variables in non-defining translation units. This option should result in better performance and works around crashing issues with our Windows build. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bb8e305b2..e9484986b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,6 +208,11 @@ add_check_cxx_flag("-Wnon-virtual-dtor") add_check_c_cxx_flag("-Wimplicit-fallthrough") add_check_c_cxx_flag("-Wshadow") +# Assume no dynamic initialization of thread-local variables in non-defining +# translation units. This option should result in better performance and works +# around crashing issues with our Windows build. +add_check_cxx_flag("-fno-extern-tls-init") + # Temporarily disable -Wclass-memaccess to suppress 'no trivial copy-assignment' # cdlist.h warnings. Remove when fixed. add_check_cxx_flag("-Wno-class-memaccess")