Skip to content

Commit 8308a79

Browse files
Rename DriverBinaryCache and streamline path concat
1 parent 0079c34 commit 8308a79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,6 @@ function Get-PinnedToolchainVersion() {
862862
throw "PinnedVersion must be set"
863863
}
864864

865-
$DriverBinaryCache = Get-HostProjectBinaryCache Driver
866865
$CompilersBinaryCache = if ($IsCrossCompiling) {
867866
Get-BuildProjectBinaryCache Compilers
868867
} else {
@@ -970,8 +969,9 @@ function Build-CMakeProject {
970969
}
971970

972971
# TODO(compnerd) workaround swiftc.exe symlink not existing.
972+
$DriverToolDir = "$(Get-HostProjectBinaryCache Driver)\bin"
973973
if ($UseSwiftSwiftDriver) {
974-
Copy-Item -Force ([IO.Path]::Combine($DriverBinaryCache, "bin", "swift-driver.exe")) ([IO.Path]::Combine($DriverBinaryCache, "bin", "swiftc.exe"))
974+
Copy-Item -Force "$DriverToolDir\swift-driver.exe" "$DriverToolDir\swiftc.exe"
975975
}
976976

977977
# Add additional defines (unless already present)
@@ -1115,7 +1115,7 @@ function Build-CMakeProject {
11151115
$SwiftArgs = @()
11161116

11171117
if ($UseSwiftSwiftDriver) {
1118-
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER ([IO.Path]::Combine($DriverBinaryCache, "bin", "swiftc.exe"))
1118+
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER "$DriverToolDir\swiftc.exe"
11191119
} elseif ($UseBuiltCompilers.Contains("Swift")) {
11201120
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER (Get-BuiltToolchainTool "swiftc.exe")
11211121
} else {

0 commit comments

Comments
 (0)