From da94668a57763711925b3c08e8e3616d87e9e090 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 6 Jun 2024 20:46:46 -0400 Subject: [PATCH] Add a workaround for MSVC/GH fuckup Visual C++ devs (Microsoft) did something idiotic, and made it so that if code compiled with the latest compiler runs against an older runtime it ... crashes without any message. https://developercommunity.visualstudio.com/t/Access-violation-in-_Thrd_yield-after-up/10664660#T-N10668856 Then Github (Microsoft) shipped an image with a new compiler and an old runtime, so that compiling anything and trying to run it fails https://github.com/actions/runner-images/issues/10004 Truly extraordinary --- src/scripts/ci_build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index bfdae2ba29b..539799716e5 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -185,6 +185,10 @@ def sanitize_kv(some_string): for flag in extra_cxxflags: flags += ['--extra-cxxflags=%s' % (flag)] + if target_os == 'windows': + # Workaround for https://github.com/actions/runner-images/issues/10004 + flags += ['--extra-cxxflags=/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR'] + if target in ['minimized']: flags += ['--minimized-build', '--enable-modules=system_rng,sha2_32,sha2_64,aes']