Skip to content

Commit 5264dd5

Browse files
authored
Merge pull request #83469 from Steelskin/fabrice/utils-remove-unused-args
utils: Remove obsolete CMake arguments
2 parents b57b836 + bb8d610 commit 5264dd5

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

utils/build.ps1

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,12 +1438,7 @@ function Build-CMakeProject {
14381438
}
14391439

14401440
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER $SWIFTC
1441-
if ($UsePinnedCompilers.Contains("Swift")) {
1442-
# TODO(compnerd): remove this once we bump to a newer pinned toolchain.
1443-
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET $Platform.Triple
1444-
} else {
1445-
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET (Get-ModuleTriple $Platform)
1446-
}
1441+
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET (Get-ModuleTriple $Platform)
14471442

14481443
# TODO(compnerd): remove this once we have the early swift-driver
14491444
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_USE_OLD_DRIVER "YES"
@@ -1512,8 +1507,6 @@ function Build-CMakeProject {
15121507

15131508
if ($UseC) {
15141509
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER_TARGET $Platform.Triple
1515-
# FIXME(compnerd) why is this needed?
1516-
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER_WORKS YES
15171510

15181511
$CFLAGS = @("--sysroot=${AndroidSysroot}")
15191512
if ($DebugInfo -and ($CDebugFormat -eq "dwarf")) {
@@ -1524,8 +1517,6 @@ function Build-CMakeProject {
15241517

15251518
if ($UseCXX) {
15261519
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER_TARGET $Platform.Triple
1527-
# FIXME(compnerd) why is this needed?
1528-
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER_WORKS YES
15291520

15301521
$CXXFLAGS = @("--sysroot=${AndroidSysroot}")
15311522
if ($DebugInfo -and ($CDebugFormat -eq "dwarf")) {
@@ -1547,13 +1538,8 @@ function Build-CMakeProject {
15471538
Join-Path -Path (Get-PinnedToolchainToolsDir) -ChildPath "swiftc.exe"
15481539
}
15491540
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER $SWIFTC
1541+
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET (Get-ModuleTriple $Platform)
15501542

1551-
# TODO(compnerd) remove this once we bump to a newer pinned toolchain
1552-
if ($UsePinnedCompilers.Contains("Swift")) {
1553-
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET $Platform.Triple
1554-
} else {
1555-
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET (Get-ModuleTriple $Platform)
1556-
}
15571543
# TODO(compnerd) remove this once we have the early swift-driver
15581544
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_USE_OLD_DRIVER "YES"
15591545

@@ -1579,7 +1565,11 @@ function Build-CMakeProject {
15791565
Add-FlagsDefine $Defines CMAKE_Swift_FLAGS_RELWITHDEBINFO "-O"
15801566
}
15811567

1582-
if ($UseASM -or $UseC -or $UseCXX) {
1568+
$UseBuiltASMCompiler = $UseBuiltCompilers.Contains("ASM")
1569+
$UseBuiltCCompiler = $UseBuiltCompilers.Contains("C")
1570+
$UseBuiltCXXCompiler = $UseBuiltCompilers.Contains("CXX")
1571+
1572+
if ($UseBuiltASMCompiler -or $UseBuiltCCompiler -or $UseBuiltCXXCompiler) {
15831573
# Use a built lld linker as the Android's NDK linker might be too old
15841574
# and not support all required relocations needed by the Swift
15851575
# runtime.

0 commit comments

Comments
 (0)