@@ -794,7 +794,9 @@ function Copy-File($Src, $Dst) {
794794 Write-Output " copy /Y `" $Src `" `" $Dst `" "
795795 } else {
796796 New-Item - ItemType Directory - ErrorAction Ignore $DstDir | Out-Null
797- Copy-Item - Force $Src $Dst
797+ Copy-Item - Force `
798+ - Path $Src `
799+ - Destination $Dst
798800 }
799801}
800802
@@ -804,7 +806,9 @@ function Copy-Directory($Src, $Dst) {
804806 Write-Output " copy /Y `" $Src `" `" $Dst `" "
805807 } else {
806808 New-Item - ItemType Directory - ErrorAction Ignore $Dst | Out-Null
807- Copy-Item - Force - Recurse $Src $Dst
809+ Copy-Item - Force - Recurse `
810+ - Path $Src `
811+ - Destination $Dst
808812 }
809813}
810814
@@ -2032,14 +2036,20 @@ function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $Test
20322036
20332037 # Transitive dependency of _lldb.pyd
20342038 $RuntimeBinaryCache = Get-ProjectBinaryCache $BuildPlatform Runtime
2035- Copy-Item $RuntimeBinaryCache \bin\swiftCore.dll " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \lib\site-packages\lldb"
2039+ Copy-Item `
2040+ - Path $RuntimeBinaryCache \bin\swiftCore.dll `
2041+ - Destination " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \lib\site-packages\lldb"
20362042
20372043 # Runtime dependencies of repl_swift.exe
20382044 $SwiftRTSubdir = " lib\swift\windows"
20392045 Write-Host " Copying '$RuntimeBinaryCache \$SwiftRTSubdir \$ ( $Platform.Architecture.LLVMName ) \swiftrt.obj' to '$ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \$SwiftRTSubdir '"
2040- Copy-Item " $RuntimeBinaryCache \$SwiftRTSubdir \$ ( $Platform.Architecture.LLVMName ) \swiftrt.obj" " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \$SwiftRTSubdir "
2046+ Copy-Item `
2047+ - Path " $RuntimeBinaryCache \$SwiftRTSubdir \$ ( $Platform.Architecture.LLVMName ) \swiftrt.obj" `
2048+ - Destination " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \$SwiftRTSubdir "
20412049 Write-Host " Copying '$RuntimeBinaryCache \bin\swiftCore.dll' to '$ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin'"
2042- Copy-Item " $RuntimeBinaryCache \bin\swiftCore.dll" " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin"
2050+ Copy-Item `
2051+ - Path " $RuntimeBinaryCache \bin\swiftCore.dll" `
2052+ - Destination " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin"
20432053
20442054 $TestingDefines += @ {
20452055 LLDB_INCLUDE_TESTS = " YES" ;
@@ -2115,7 +2125,9 @@ function Build-mimalloc() {
21152125 $BuildSuffix = if ($BuildPlatform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
21162126
21172127 foreach ($item in " mimalloc.dll" , " mimalloc-redirect$HostSuffix .dll" ) {
2118- Copy-Item - Path " $BinaryCache \$ ( $Platform.Triple ) \mimalloc\bin\$item " - Destination " $ ( $Platform.ToolchainInstallRoot ) \usr\bin\"
2128+ Copy-Item `
2129+ - Path " $BinaryCache \$ ( $Platform.Triple ) \mimalloc\bin\$item " `
2130+ - Destination " $ ( $Platform.ToolchainInstallRoot ) \usr\bin\"
21192131 }
21202132
21212133 # TODO: should we split this out into its own function?
@@ -3449,16 +3461,20 @@ function Install-HostToolchain() {
34493461
34503462 # Restructure _InternalSwiftScan (keep the original one for the installer)
34513463 Copy-Item - Force `
3452- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\_InternalSwiftScan" `
3453- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\include"
3464+ - Path " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\_InternalSwiftScan" `
3465+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\include"
34543466 Copy-Item - Force `
3455- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\windows\_InternalSwiftScan.lib" `
3456- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib"
3467+ - Path " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\windows\_InternalSwiftScan.lib" `
3468+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib"
34573469
34583470 # Switch to swift-driver
34593471 $SwiftDriver = ([IO.Path ]::Combine((Get-ProjectBinaryCache $HostPlatform Driver), " bin" , " swift-driver.exe" ))
3460- Copy-Item - Force $SwiftDriver " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swift.exe"
3461- Copy-Item - Force $SwiftDriver " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swiftc.exe"
3472+ Copy-Item - Force `
3473+ - Path $SwiftDriver `
3474+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swift.exe"
3475+ Copy-Item - Force `
3476+ - Path $SwiftDriver `
3477+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swiftc.exe"
34623478}
34633479
34643480function Build-Inspect ([Hashtable ] $Platform ) {
0 commit comments