Skip to content

Commit

Permalink
Windows: Workaround for crashing with older Visual C++ runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Jul 2, 2024
1 parent c277a97 commit 6930470
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dist/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6930470

Please sign in to comment.