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() {
22542254 Invoke-Program $msbuild " $SourceCache \mimalloc\ide\vs2022\mimalloc-override-dll.vcxproj" @MSBuildArgs " -p:IntDir=$BinaryCache \$ ( $Platform.Triple ) \mimalloc\mimalloc-override-dll\"
22552255
22562256 $HostSuffix = if ($Platform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
2257- $BuildSuffix = if ($BuildPlatform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
22582257
22592258 foreach ($item in " mimalloc.dll" , " mimalloc-redirect$HostSuffix .dll" ) {
22602259 Copy-Item `
22612260 - Path " $BinaryCache \$ ( $Platform.Triple ) \mimalloc\bin\$item " `
22622261 - Destination " $ ( $Platform.ToolchainInstallRoot ) \usr\bin\"
22632262 }
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" }
22642274
2265- # TODO: should we split this out into its own function?
22662275 $Tools = @ (
22672276 " swift.exe" ,
22682277 " swiftc.exe" ,
@@ -4069,6 +4078,10 @@ if (-not $SkipBuild -and -not $IsCrossCompiling) {
40694078 Invoke-BuildStep Build-DocC $HostPlatform
40704079}
40714080
4081+ if (-not $SkipBuild ) {
4082+ Invoke-BuildStep Patch- mimalloc $HostPlatform
4083+ }
4084+
40724085if (-not $SkipPackaging ) {
40734086 Invoke-BuildStep Build-Installer $HostPlatform
40744087}
You can’t perform that action at this time.
0 commit comments