@@ -3430,21 +3430,21 @@ jobs:
3430
3430
}
3431
3431
3432
3432
- uses : actions/checkout@v4
3433
- if : matrix.arch == 'amd64'
3434
3433
with :
3435
3434
repository : microsoft/mimalloc
3436
3435
ref : ${{ inputs.mimalloc_revision }}
3437
3436
path : ${{ github.workspace }}/SourceCache/mimalloc
3438
3437
3439
3438
- name : Build and apply mimalloc
3440
- if : matrix.arch == 'amd64'
3441
3439
run : |
3440
+ $Arch = if ("${{ matrix.arch }}" -eq "amd64") { "x64" } else { "arm64" }
3441
+ $ArchSuffix = if ("${{ matrix.arch }}" -eq "amd64") { "" } else { "-arm64" }
3442
3442
# Reference: https://github.com/microsoft/mimalloc/tree/dev/bin#minject
3443
- msbuild ${{ github.workspace }}\SourceCache\mimalloc\ide\vs2022\mimalloc.sln -p:Configuration=Release
3443
+ msbuild ${{ github.workspace }}\SourceCache\mimalloc\ide\vs2022\mimalloc.sln -p:Configuration=Release -p:Platform=$Arch
3444
3444
$ToolchainBin = "${{ github.workspace }}\BuildRoot\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin"
3445
- Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-x64 \Release\mimalloc-override .dll" `
3445
+ Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-$Arch \Release\mimalloc.dll" `
3446
3446
-Destination "$ToolchainBin"
3447
- Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-x64 \Release\mimalloc-redirect.dll" `
3447
+ Copy-Item -Path "${{ github.workspace }}\SourceCache\mimalloc\out\msvc-$Arch \Release\mimalloc-redirect$ArchSuffix .dll" `
3448
3448
-Destination "$ToolchainBin"
3449
3449
$MimallocExecutables = @("swift.exe",
3450
3450
"swiftc.exe",
@@ -3459,9 +3459,9 @@ jobs:
3459
3459
"ld64.lld.exe")
3460
3460
foreach ($Exe in $MimallocExecutables) {
3461
3461
# Binary-patch in place
3462
- ${{ github.workspace }}\SourceCache\mimalloc\bin\minject -f -i -v "$ToolchainBin\$Exe"
3462
+ " ${{ github.workspace }}\SourceCache\mimalloc\bin\minject$ArchSuffix.exe" -f -i -v "$ToolchainBin\$Exe"
3463
3463
# Log the import table
3464
- ${{ github.workspace }}\SourceCache\mimalloc\bin\minject -l "$ToolchainBin\$Exe"
3464
+ " ${{ github.workspace }}\SourceCache\mimalloc\bin\minject$ArchSuffix.exe" -l "$ToolchainBin\$Exe"
3465
3465
}
3466
3466
3467
3467
- name : Package Build Tools
@@ -3473,7 +3473,7 @@ jobs:
3473
3473
-p:CERTIFICATE=${env:CERTIFICATE} `
3474
3474
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
3475
3475
-p:TOOLCHAIN_ROOT=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain `
3476
- -p:ENABLE_MIMALLOC=${{ matrix.arch == 'amd64' && ' true' || 'false' }} `
3476
+ -p:ENABLE_MIMALLOC=true `
3477
3477
-p:ProductArchitecture=${{ matrix.arch }} `
3478
3478
-p:ProductVersion=${{ inputs.swift_version }} `
3479
3479
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/bld/bld.wixproj
0 commit comments