Skip to content

Commit 4af35bb

Browse files
committed
utils: rename Get-PinnedToolcahinTool
This function does not get a tool from the toolchain but rather the toolchain tools directory. Rename the function to be more accurate.
1 parent 76ae4ed commit 4af35bb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

utils/build.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ function Fetch-Dependencies {
933933
}
934934
}
935935

936-
function Get-PinnedToolchainTool() {
936+
function Get-PinnedToolchainToolsDir() {
937937
# NOTE: add a workaround for the main snapshots that used the wrong version
938938
# when building that was not noticed. This allows use of the nightly snapshot
939939
# as a pinned toolchain.
@@ -1166,7 +1166,7 @@ function Build-CMakeProject {
11661166
if ($UseBuiltCompilers.Contains("ASM")) {
11671167
TryAdd-KeyValue $Defines CMAKE_ASM_COMPILER ([IO.Path]::Combine($CompilersBinaryCache, "bin", $Driver))
11681168
} else {
1169-
TryAdd-KeyValue $Defines CMAKE_ASM_COMPILER (Join-Path -Path (Get-PinnedToolchainTool) -ChildPath $Driver)
1169+
TryAdd-KeyValue $Defines CMAKE_ASM_COMPILER (Join-Path -Path (Get-PinnedToolchainToolsDir) -ChildPath $Driver)
11701170
}
11711171
Append-FlagsDefine $Defines CMAKE_ASM_FLAGS "--target=$($Arch.LLVMTarget)"
11721172
if ($Platform -eq "Windows") {
@@ -1178,7 +1178,7 @@ function Build-CMakeProject {
11781178
if ($UseBuiltCompilers.Contains("C")) {
11791179
TryAdd-KeyValue $Defines CMAKE_C_COMPILER ([IO.Path]::Combine($CompilersBinaryCache, "bin", $Driver))
11801180
} else {
1181-
TryAdd-KeyValue $Defines CMAKE_C_COMPILER (Join-Path -Path (Get-PinnedToolchainTool) -ChildPath $Driver)
1181+
TryAdd-KeyValue $Defines CMAKE_C_COMPILER (Join-Path -Path (Get-PinnedToolchainToolsDir) -ChildPath $Driver)
11821182
}
11831183
TryAdd-KeyValue $Defines CMAKE_C_COMPILER_TARGET $Arch.LLVMTarget
11841184

@@ -1192,7 +1192,7 @@ function Build-CMakeProject {
11921192
if ($UseBuiltCompilers.Contains("CXX")) {
11931193
TryAdd-KeyValue $Defines CMAKE_CXX_COMPILER ([IO.Path]::Combine($CompilersBinaryCache, "bin", $Driver))
11941194
} else {
1195-
TryAdd-KeyValue $Defines CMAKE_CXX_COMPILER (Join-Path -Path (Get-PinnedToolchainTool) -ChildPath $Driver)
1195+
TryAdd-KeyValue $Defines CMAKE_CXX_COMPILER (Join-Path -Path (Get-PinnedToolchainToolsDir) -ChildPath $Driver)
11961196
}
11971197
TryAdd-KeyValue $Defines CMAKE_CXX_COMPILER_TARGET $Arch.LLVMTarget
11981198

@@ -1209,7 +1209,7 @@ function Build-CMakeProject {
12091209
} elseif ($UseBuiltCompilers.Contains("Swift")) {
12101210
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER ([IO.Path]::Combine($CompilersBinaryCache, "bin", "swiftc.exe"))
12111211
} else {
1212-
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER (Join-Path -Path (Get-PinnedToolchainTool) -ChildPath "swiftc.exe")
1212+
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER (Join-Path -Path (Get-PinnedToolchainToolsDir) -ChildPath "swiftc.exe")
12131213
}
12141214
if (-not ($Platform -eq "Windows")) {
12151215
TryAdd-KeyValue $Defines CMAKE_Swift_COMPILER_WORKS = "YES"
@@ -1690,7 +1690,7 @@ function Build-Compilers() {
16901690
Python3_LIBRARY = "$PythonRoot\libs\$PythonLibName.lib";
16911691
Python3_ROOT_DIR = $PythonRoot;
16921692
SWIFT_BUILD_SWIFT_SYNTAX = "YES";
1693-
SWIFT_CLANG_LOCATION = (Get-PinnedToolchainTool);
1693+
SWIFT_CLANG_LOCATION = (Get-PinnedToolchainToolsDir);
16941694
SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY = "YES";
16951695
SWIFT_ENABLE_EXPERIMENTAL_CXX_INTEROP = "YES";
16961696
SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING = "YES";

0 commit comments

Comments
 (0)