From 693047025b631656c838636c85d26c2b63cbd05b Mon Sep 17 00:00:00 2001 From: "J.D. Purcell" Date: Mon, 1 Jul 2024 22:37:08 -0400 Subject: [PATCH] Windows: Workaround for crashing with older Visual C++ runtimes --- dist/scripts/build.ps1 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dist/scripts/build.ps1 b/dist/scripts/build.ps1 index 400f13d8..4575d535 100755 --- a/dist/scripts/build.ps1 +++ b/dist/scripts/build.ps1 @@ -9,12 +9,13 @@ if ($IsWindows) { dist/scripts/vcvars.ps1 } -if ($env:buildArch -eq 'Universal') { - qmake QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" $args[0] PREFIX=$Prefix DEFINES+="$env:nightlyDefines" -} else { - qmake $args[0] PREFIX=$Prefix DEFINES+="$env:nightlyDefines" +if ($IsMacOS -and $env:buildArch -eq 'Universal') { + $argDeviceArchs = 'QMAKE_APPLE_DEVICE_ARCHS=x86_64 arm64' +} elseif ($IsWindows) { + # Workaround for https://developercommunity.visualstudio.com/t/10664660 + $argVcrMutexWorkaround = 'DEFINES+=_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR' } - +qmake $args[0] PREFIX=$Prefix DEFINES+="$env:nightlyDefines" $argVcrMutexWorkaround $argDeviceArchs if ($IsWindows) { nmake