File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -2254,15 +2254,24 @@ function Build-mimalloc() {
2254
2254
Invoke-Program $msbuild " $SourceCache \mimalloc\ide\vs2022\mimalloc-override-dll.vcxproj" @MSBuildArgs " -p:IntDir=$BinaryCache \$ ( $Platform.Triple ) \mimalloc\mimalloc-override-dll\"
2255
2255
2256
2256
$HostSuffix = if ($Platform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
2257
- $BuildSuffix = if ($BuildPlatform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
2258
2257
2259
2258
foreach ($item in " mimalloc.dll" , " mimalloc-redirect$HostSuffix .dll" ) {
2260
2259
Copy-Item `
2261
2260
- Path " $BinaryCache \$ ( $Platform.Triple ) \mimalloc\bin\$item " `
2262
2261
- Destination " $ ( $Platform.ToolchainInstallRoot ) \usr\bin\"
2263
2262
}
2263
+ }
2264
+
2265
+ function Patch-mimalloc () {
2266
+ [CmdletBinding (PositionalBinding = $false )]
2267
+ param
2268
+ (
2269
+ [Parameter (Position = 0 , Mandatory = $true )]
2270
+ [hashtable ]$Platform
2271
+ )
2272
+
2273
+ $BuildSuffix = if ($BuildPlatform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
2264
2274
2265
- # TODO: should we split this out into its own function?
2266
2275
$Tools = @ (
2267
2276
" swift.exe" ,
2268
2277
" swiftc.exe" ,
@@ -4069,6 +4078,10 @@ if (-not $SkipBuild -and -not $IsCrossCompiling) {
4069
4078
Invoke-BuildStep Build-DocC $HostPlatform
4070
4079
}
4071
4080
4081
+ if (-not $SkipBuild ) {
4082
+ Invoke-BuildStep Patch- mimalloc $HostPlatform
4083
+ }
4084
+
4072
4085
if (-not $SkipPackaging ) {
4073
4086
Invoke-BuildStep Build-Installer $HostPlatform
4074
4087
}
You can’t perform that action at this time.
0 commit comments