Disable the use of compiler TLS by default under Windows.
While compiler TLS support is simpler to use and much faster than using our own Win32 API-based TLS implementation, it results in difficult to debug crashes when used inside a dynamically loaded DLL under Windows XP, so disable it by default to be safe. Closes #13116. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -268,14 +268,21 @@
|
||||
|
||||
// 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 must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// 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.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// 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
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user