@@ -1438,12 +1438,7 @@ function Build-CMakeProject {
1438
1438
}
1439
1439
1440
1440
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 )
1447
1442
1448
1443
# TODO(compnerd): remove this once we have the early swift-driver
1449
1444
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_USE_OLD_DRIVER " YES"
@@ -1512,8 +1507,6 @@ function Build-CMakeProject {
1512
1507
1513
1508
if ($UseC ) {
1514
1509
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
1517
1510
1518
1511
$CFLAGS = @ (" --sysroot=${AndroidSysroot} " )
1519
1512
if ($DebugInfo -and ($CDebugFormat -eq " dwarf" )) {
@@ -1524,8 +1517,6 @@ function Build-CMakeProject {
1524
1517
1525
1518
if ($UseCXX ) {
1526
1519
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
1529
1520
1530
1521
$CXXFLAGS = @ (" --sysroot=${AndroidSysroot} " )
1531
1522
if ($DebugInfo -and ($CDebugFormat -eq " dwarf" )) {
@@ -1547,13 +1538,8 @@ function Build-CMakeProject {
1547
1538
Join-Path - Path (Get-PinnedToolchainToolsDir ) - ChildPath " swiftc.exe"
1548
1539
}
1549
1540
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER $SWIFTC
1541
+ Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET (Get-ModuleTriple $Platform )
1550
1542
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
- }
1557
1543
# TODO(compnerd) remove this once we have the early swift-driver
1558
1544
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_USE_OLD_DRIVER " YES"
1559
1545
@@ -1579,7 +1565,11 @@ function Build-CMakeProject {
1579
1565
Add-FlagsDefine $Defines CMAKE_Swift_FLAGS_RELWITHDEBINFO " -O"
1580
1566
}
1581
1567
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 ) {
1583
1573
# Use a built lld linker as the Android's NDK linker might be too old
1584
1574
# and not support all required relocations needed by the Swift
1585
1575
# runtime.
0 commit comments