@@ -791,7 +791,9 @@ function Copy-File($Src, $Dst) {
791791 Write-Output " copy /Y `" $Src `" `" $Dst `" "
792792 } else {
793793 New-Item - ItemType Directory - ErrorAction Ignore $DstDir | Out-Null
794- Copy-Item - Force $Src $Dst
794+ Copy-Item - Force `
795+ - Path $Src `
796+ - Destination $Dst
795797 }
796798}
797799
@@ -801,7 +803,9 @@ function Copy-Directory($Src, $Dst) {
801803 Write-Output " copy /Y `" $Src `" `" $Dst `" "
802804 } else {
803805 New-Item - ItemType Directory - ErrorAction Ignore $Dst | Out-Null
804- Copy-Item - Force - Recurse $Src $Dst
806+ Copy-Item - Force - Recurse `
807+ - Path $Src `
808+ - Destination $Dst
805809 }
806810}
807811
@@ -2027,14 +2031,20 @@ function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $Test
20272031
20282032 # Transitive dependency of _lldb.pyd
20292033 $RuntimeBinaryCache = Get-ProjectBinaryCache $BuildPlatform Runtime
2030- Copy-Item $RuntimeBinaryCache \bin\swiftCore.dll " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \lib\site-packages\lldb"
2034+ Copy-Item `
2035+ - Path $RuntimeBinaryCache \bin\swiftCore.dll `
2036+ - Destination " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \lib\site-packages\lldb"
20312037
20322038 # Runtime dependencies of repl_swift.exe
20332039 $SwiftRTSubdir = " lib\swift\windows"
20342040 Write-Host " Copying '$RuntimeBinaryCache \$SwiftRTSubdir \$ ( $Platform.Architecture.LLVMName ) \swiftrt.obj' to '$ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \$SwiftRTSubdir '"
2035- Copy-Item " $RuntimeBinaryCache \$SwiftRTSubdir \$ ( $Platform.Architecture.LLVMName ) \swiftrt.obj" " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \$SwiftRTSubdir "
2041+ Copy-Item `
2042+ - Path " $RuntimeBinaryCache \$SwiftRTSubdir \$ ( $Platform.Architecture.LLVMName ) \swiftrt.obj" `
2043+ - Destination " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \$SwiftRTSubdir "
20362044 Write-Host " Copying '$RuntimeBinaryCache \bin\swiftCore.dll' to '$ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin'"
2037- Copy-Item " $RuntimeBinaryCache \bin\swiftCore.dll" " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin"
2045+ Copy-Item `
2046+ - Path " $RuntimeBinaryCache \bin\swiftCore.dll" `
2047+ - Destination " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin"
20382048
20392049 $TestingDefines += @ {
20402050 LLDB_INCLUDE_TESTS = " YES" ;
@@ -2110,7 +2120,9 @@ function Build-mimalloc() {
21102120 $BuildSuffix = if ($BuildPlatform -eq $KnownPlatforms [" WindowsX64" ]) { " " } else { " -arm64" }
21112121
21122122 foreach ($item in " mimalloc.dll" , " mimalloc-redirect$HostSuffix .dll" ) {
2113- Copy-Item - Path " $BinaryCache \$ ( $Platform.Triple ) \mimalloc\bin\$item " - Destination " $ ( $Platform.ToolchainInstallRoot ) \usr\bin\"
2123+ Copy-Item `
2124+ - Path " $BinaryCache \$ ( $Platform.Triple ) \mimalloc\bin\$item " `
2125+ - Destination " $ ( $Platform.ToolchainInstallRoot ) \usr\bin\"
21142126 }
21152127
21162128 # TODO: should we split this out into its own function?
@@ -3484,16 +3496,20 @@ function Install-HostToolchain() {
34843496
34853497 # Restructure _InternalSwiftScan (keep the original one for the installer)
34863498 Copy-Item - Force `
3487- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\_InternalSwiftScan" `
3488- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\include"
3499+ - Path " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\_InternalSwiftScan" `
3500+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\include"
34893501 Copy-Item - Force `
3490- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\windows\_InternalSwiftScan.lib" `
3491- " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib"
3502+ - Path " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\swift\windows\_InternalSwiftScan.lib" `
3503+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib"
34923504
34933505 # Switch to swift-driver
34943506 $SwiftDriver = ([IO.Path ]::Combine((Get-ProjectBinaryCache $HostPlatform Driver), " bin" , " swift-driver.exe" ))
3495- Copy-Item - Force $SwiftDriver " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swift.exe"
3496- Copy-Item - Force $SwiftDriver " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swiftc.exe"
3507+ Copy-Item - Force `
3508+ - Path $SwiftDriver `
3509+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swift.exe"
3510+ Copy-Item - Force `
3511+ - Path $SwiftDriver `
3512+ - Destination " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\bin\swiftc.exe"
34973513}
34983514
34993515function Build-Inspect ([Hashtable ] $Platform ) {
0 commit comments