Skip to content

Commit

Permalink
STL updates Mutex Fix
Browse files Browse the repository at this point in the history
microsoft/STL#3824
microsoft/STL#4000
microsoft/STL#4339

Add escape hatch due to STL change resulting in issues with binary compatibility.

https://github.com/microsoft/STL/wiki/Changelog
"Fixed bugs:

    Fixed mutex's constructor to be constexpr. #3824 #4000 #4339
        Note: Programs that aren't following the documented restrictions on binary compatibility may encounter null dereferences in mutex machinery. You must follow this rule:

            When you mix binaries built by different supported versions of the toolset, the Redistributable version must be at least as new as the latest toolset used by any app component.

        You can define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR as an escape hatch."
  • Loading branch information
narknon committed Jun 22, 2024
1 parent 3524b88 commit 8d21bf4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/xmakescripts/rules/build_rules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ local MSVC_COMPILE_OPTIONS = {
},
["shflags"] = {
"/DEBUG:FULL"
},
["defines"] = {
"_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR=1"
}
}

Expand Down

0 comments on commit 8d21bf4

Please sign in to comment.