From 8d21bf42ab28eba6a0e5eed57b2c12f20f0ac788 Mon Sep 17 00:00:00 2001 From: narknon Date: Sat, 22 Jun 2024 12:07:22 -0400 Subject: [PATCH] STL updates Mutex Fix https://github.com/microsoft/STL/pull/3824 https://github.com/microsoft/STL/pull/4000 https://github.com/microsoft/STL/pull/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." --- tools/xmakescripts/rules/build_rules.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/xmakescripts/rules/build_rules.lua b/tools/xmakescripts/rules/build_rules.lua index 194d2849d..0a44ce2a7 100644 --- a/tools/xmakescripts/rules/build_rules.lua +++ b/tools/xmakescripts/rules/build_rules.lua @@ -109,6 +109,9 @@ local MSVC_COMPILE_OPTIONS = { }, ["shflags"] = { "/DEBUG:FULL" + }, + ["defines"] = { + "_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR=1" } }