Skip to content

Commit

Permalink
Merge pull request #693 from jdpurcell/pr-winvcrworkaround
Browse files Browse the repository at this point in the history
Windows: Workaround for crashing with older Visual C++ runtimes
  • Loading branch information
jurplel authored Jul 14, 2024
2 parents c277a97 + 6930470 commit fc02b1c
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 fc02b1c

Please sign in to comment.