Remove wxUSE_COMPILER_TLS and always use C++11 thread_local

Don't use compiler-specific __thread and use the standard keyword
instead.

Keep the existing TLS-related macros for compatibility, but remove our
custom implementation of them, so that they're always trivial now.
This commit is contained in:
Vadim Zeitlin 2022-10-26 02:02:32 +01:00
parent 5845312825
commit 4e802e6fc7
24 changed files with 45 additions and 734 deletions

View file

@ -287,25 +287,6 @@
// Recommended setting: 1 if you want to support multiple languages
#define wxUSE_PRINTF_POS_PARAMS 1
// Enable the use of compiler-specific thread local storage keyword, if any.
// This is used for wxTLS_XXX() macros implementation and normally should use
// the compiler-provided support as it's simpler and more efficient, but is
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
// XP as this triggers a bug in compiler TLS support that results in crashes
// when any TLS variables are used.
//
// If you're absolutely sure that your build of wxWidgets is never going to be
// used in such situation, either because it's not going to be linked from any
// kind of plugin or because you only target Vista or later systems, you can
// set this to 2 to force the use of compiler TLS even under MSW.
//
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
//
// Recommended setting: 2 if you want to have maximal performance and don't
// care about the scenario described above.
#define wxUSE_COMPILER_TLS 1
// ----------------------------------------------------------------------------
// Interoperability with the standard library.
// ----------------------------------------------------------------------------