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 @@ -2222,15 +2222,24 @@ function Build-mimalloc() {
2222
2222
Invoke-Program $msbuild " $SourceCache \mimalloc\ide\vs2022\mimalloc-override-dll.vcxproj" @MSBuildArgs " -p:IntDir=$BinaryCache \$ ( $Platform.Triple ) \mimalloc\mimalloc-override-dll\"
2223
2223
2224
2224
$HostSuffix = if ($Platform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
2225
- $BuildSuffix = if ($BuildPlatform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
2226
2225
2227
2226
foreach ($item in " mimalloc.dll" , " mimalloc-redirect$HostSuffix .dll" ) {
2228
2227
Copy-Item `
2229
2228
- Path " $BinaryCache \$ ( $Platform.Triple ) \mimalloc\bin\$item " `
2230
2229
- Destination " $ ( $Platform.ToolchainInstallRoot ) \usr\bin\"
2231
2230
}
2231
+ }
2232
+
2233
+ function Patch-mimalloc () {
2234
+ [CmdletBinding (PositionalBinding = $false )]
2235
+ param
2236
+ (
2237
+ [Parameter (Position = 0 , Mandatory = $true )]
2238
+ [hashtable ]$Platform
2239
+ )
2240
+
2241
+ $BuildSuffix = if ($BuildPlatform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
2232
2242
2233
- # TODO: should we split this out into its own function?
2234
2243
$Tools = @ (
2235
2244
" swift.exe" ,
2236
2245
" swiftc.exe" ,
@@ -4030,6 +4039,10 @@ if (-not $SkipBuild -and -not $IsCrossCompiling) {
4030
4039
Invoke-BuildStep Build-DocC $HostPlatform
4031
4040
}
4032
4041
4042
+ if (-not $SkipBuild ) {
4043
+ Invoke-BuildStep Patch- mimalloc $HostPlatform
4044
+ }
4045
+
4033
4046
if (-not $SkipPackaging ) {
4034
4047
Invoke-BuildStep Build-Installer $HostPlatform
4035
4048
}
You can’t perform that action at this time.
0 commit comments