@@ -857,6 +857,13 @@ function Get-PinnedToolchainVersion() {
857
857
throw " PinnedVersion must be set"
858
858
}
859
859
860
+ $DriverBinaryCache = Get-HostProjectBinaryCache Driver
861
+ $CompilersBinaryCache = if ($IsCrossCompiling ) {
862
+ Get-BuildProjectBinaryCache Compilers
863
+ } else {
864
+ Get-HostProjectBinaryCache Compilers
865
+ }
866
+
860
867
function Get-ClangDriverName ([Platform ] $Platform , [string ] $Lang ) {
861
868
switch ($Platform ) {
862
869
Windows {
@@ -941,13 +948,6 @@ function Build-CMakeProject {
941
948
Invoke-VsDevShell $Arch
942
949
}
943
950
944
- $CompilersBinaryCache = if ($IsCrossCompiling ) {
945
- Get-BuildProjectBinaryCache Compilers
946
- } else {
947
- Get-HostProjectBinaryCache Compilers
948
- }
949
- $DriverBinaryCache = Get-HostProjectBinaryCache Driver
950
-
951
951
if ($EnableCaching ) {
952
952
$env: SCCACHE_DIRECT = " true"
953
953
if ($Cache -eq " " ) {
@@ -1469,11 +1469,6 @@ function Build-Compilers() {
1469
1469
)
1470
1470
1471
1471
Isolate- EnvVars {
1472
- $CompilersBinaryCache = if ($Build ) {
1473
- Get-BuildProjectBinaryCache Compilers
1474
- } else {
1475
- Get-HostProjectBinaryCache Compilers
1476
- }
1477
1472
$BuildTools = Join-Path - Path (Get-BuildProjectBinaryCache BuildTools) - ChildPath bin
1478
1473
1479
1474
if ($TestClang -or $TestLLD -or $TestLLDB -or $TestLLVM -or $TestSwift ) {
@@ -1830,12 +1825,6 @@ function Build-Runtime([Platform]$Platform, $Arch) {
1830
1825
Isolate- EnvVars {
1831
1826
$env: Path = " $ ( Get-CMarkBinaryCache $Arch ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
1832
1827
1833
- $CompilersBinaryCache = if ($IsCrossCompiling ) {
1834
- Get-BuildProjectBinaryCache Compilers
1835
- } else {
1836
- Get-HostProjectBinaryCache Compilers
1837
- }
1838
-
1839
1828
Build-CMakeProject `
1840
1829
- Src $SourceCache \swift `
1841
1830
- Bin (Get-TargetProjectBinaryCache $Arch Runtime) `
0 commit comments