Skip to content

Commit 6a38596

Browse files
Rename DriverBinaryCache and streamline path concat
1 parent eecff69 commit 6a38596

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
@@ -833,7 +833,6 @@ function Get-PinnedToolchainVersion() {
833833
throw "PinnedVersion must be set"
834834
}
835835

836-
$DriverBinaryCache = Get-HostProjectBinaryCache Driver
837836
$CompilersBinaryCache = if ($IsCrossCompiling) {
838837
Get-BuildProjectBinaryCache Compilers
839838
} else {
@@ -941,8 +940,9 @@ function Build-CMakeProject {
941940
}
942941

943942
# TODO(compnerd) workaround swiftc.exe symlink not existing.
943+
$DriverToolDir = "$(Get-HostProjectBinaryCache Driver)\bin"
944944
if ($UseSwiftSwiftDriver) {
945-
Copy-Item -Force ([IO.Path]::Combine($DriverBinaryCache, "bin", "swift-driver.exe")) ([IO.Path]::Combine($DriverBinaryCache, "bin", "swiftc.exe"))
945+
Copy-Item -Force "$DriverToolDir\swift-driver.exe" "$DriverToolDir\swiftc.exe"
946946
}
947947

948948
# Add additional defines (unless already present)
@@ -1087,7 +1087,7 @@ function Build-CMakeProject {
10871087
$SwiftArgs = @()
10881088

10891089
if ($UseSwiftSwiftDriver) {
1090-
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER ([IO.Path]::Combine($DriverBinaryCache, "bin", "swiftc.exe"))
1090+
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER "$DriverToolDir\swiftc.exe"
10911091
} elseif ($UseBuiltCompilers.Contains("Swift")) {
10921092
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER (Get-BuiltToolchainTool "swiftc.exe")
10931093
} else {

0 commit comments

Comments
 (0)