@@ -1172,7 +1172,7 @@ function Build-CMakeProject {
1172
1172
}
1173
1173
}
1174
1174
1175
- if (" " -ne $InstallTo ) {
1175
+ if ($BuildTargets .Length -eq 0 -and $InstallTo ) {
1176
1176
Invoke-Program cmake.exe -- build $Bin -- target install
1177
1177
}
1178
1178
}
@@ -1309,7 +1309,6 @@ function Build-CMark($Arch) {
1309
1309
- Bin " $ ( $Arch.BinaryCache ) \cmark-gfm-0.29.0.gfm.13" `
1310
1310
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1311
1311
- Arch $Arch `
1312
- - BuildTargets default `
1313
1312
- Defines @ {
1314
1313
BUILD_SHARED_LIBS = " YES" ;
1315
1314
BUILD_TESTING = " NO" ;
@@ -1477,7 +1476,6 @@ function Build-ZLib([Platform]$Platform, $Arch) {
1477
1476
- Arch $Arch `
1478
1477
- Platform $Platform `
1479
1478
- UseMSVCCompilers C `
1480
- - BuildTargets default `
1481
1479
- Defines @ {
1482
1480
BUILD_SHARED_LIBS = " NO" ;
1483
1481
CMAKE_POSITION_INDEPENDENT_CODE = " YES" ;
@@ -1497,7 +1495,6 @@ function Build-XML2([Platform]$Platform, $Arch) {
1497
1495
- Arch $Arch `
1498
1496
- Platform $Platform `
1499
1497
- UseMSVCCompilers C, CXX `
1500
- - BuildTargets default `
1501
1498
- Defines @ {
1502
1499
BUILD_SHARED_LIBS = " NO" ;
1503
1500
CMAKE_INSTALL_BINDIR = " bin/$Platform /$ArchName " ;
@@ -1564,7 +1561,6 @@ function Build-CURL([Platform]$Platform, $Arch) {
1564
1561
- Arch $Arch `
1565
1562
- Platform $Platform `
1566
1563
- UseMSVCCompilers C `
1567
- - BuildTargets default `
1568
1564
- Defines ($PlatformDefines + @ {
1569
1565
BUILD_SHARED_LIBS = " NO" ;
1570
1566
BUILD_TESTING = " NO" ;
@@ -1687,7 +1683,6 @@ function Build-Runtime([Platform]$Platform, $Arch) {
1687
1683
- Platform $Platform `
1688
1684
- CacheScript $SourceCache \swift\cmake\caches\Runtime- $Platform - $ ($Arch.LLVMName ).cmake `
1689
1685
- UseBuiltCompilers C, CXX, Swift `
1690
- - BuildTargets default `
1691
1686
- Defines ($PlatformDefines + @ {
1692
1687
CMAKE_Swift_COMPILER_TARGET = $Arch.LLVMTarget.Replace (" $AndroidAPILevel " , " " );
1693
1688
CMAKE_Swift_COMPILER_WORKS = " YES" ;
@@ -1728,7 +1723,6 @@ function Build-Dispatch([Platform]$Platform, $Arch, [switch]$Test = $false) {
1728
1723
- Arch $Arch `
1729
1724
- Platform $Platform `
1730
1725
- UseBuiltCompilers C, CXX, Swift `
1731
- - BuildTargets $Targets `
1732
1726
- Defines @ {
1733
1727
ENABLE_SWIFT = " YES" ;
1734
1728
}
@@ -1772,7 +1766,6 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
1772
1766
1773
1767
Isolate- EnvVars {
1774
1768
$TestingDefines = @ { ENABLE_TESTING = " NO" }
1775
- $Targets = @ (" default" )
1776
1769
$InstallPath = " $ ( $Arch.SDKInstallRoot ) \usr"
1777
1770
1778
1771
Build-CMakeProject `
@@ -1782,7 +1775,7 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
1782
1775
- Arch $Arch `
1783
1776
- Platform $Platform `
1784
1777
- UseBuiltCompilers ASM, C, CXX, Swift `
1785
- - BuildTargets $Targets `
1778
+ - SwiftSDK: $SDKRoot `
1786
1779
- Defines (@ {
1787
1780
FOUNDATION_BUILD_TOOLS = if ($Platform -eq " Windows" ) { " YES" } else { " NO" };
1788
1781
CURL_DIR = " $LibraryRoot \curl-8.9.1\usr\lib\$Platform \$ShortArch \cmake\CURL" ;
@@ -1832,15 +1825,11 @@ function Build-FoundationMacros() {
1832
1825
$SwiftSDK = $BuildArch.SDKInstallRoot
1833
1826
}
1834
1827
1835
- $Targets = if ($Build ) {
1836
- @ (" default" )
1837
- } else {
1838
- @ (" default" , " install" )
1839
- }
1840
-
1841
1828
$InstallDir = $null
1829
+ $Targets = @ (" default" )
1842
1830
if (-not $Build ) {
1843
1831
$InstallDir = " $ ( $Arch.ToolchainInstallRoot ) \usr"
1832
+ $Targets = @ ()
1844
1833
}
1845
1834
1846
1835
$SwiftSyntaxCMakeModules = if ($Build -and $HostArch -ne $BuildArch ) {
@@ -1857,7 +1846,7 @@ function Build-FoundationMacros() {
1857
1846
- Platform $Platform `
1858
1847
- UseBuiltCompilers Swift `
1859
1848
- SwiftSDK:$SwiftSDK `
1860
- - BuildTargets $Targets `
1849
+ - BuildTargets: $Targets `
1861
1850
- Defines @ {
1862
1851
SwiftSyntax_DIR = $SwiftSyntaxCMakeModules ;
1863
1852
}
@@ -1882,7 +1871,7 @@ function Build-XCTest([Platform]$Platform, $Arch, [switch]$Test = $false) {
1882
1871
$env: Path = " $XCTestBinaryCache ;$FoundationBinaryCache \bin;$DispatchBinaryCache ;$ ( Get-TargetProjectBinaryCache $Arch Runtime) \bin;$env: Path ;$UnixToolsBinDir "
1883
1872
} else {
1884
1873
$TestingDefines = @ { ENABLE_TESTING = " NO" }
1885
- $Targets = @ (" default " )
1874
+ $Targets = @ (" install " )
1886
1875
$InstallPath = " $ ( $Arch.XCTestInstallRoot ) \usr"
1887
1876
}
1888
1877
@@ -1910,7 +1899,6 @@ function Build-Testing([Platform]$Platform, $Arch, [switch]$Test = $false) {
1910
1899
# TODO: Test
1911
1900
return
1912
1901
} else {
1913
- $Targets = @ (" default" )
1914
1902
$InstallPath = " $ ( $Arch.SwiftTestingInstallRoot ) \usr"
1915
1903
}
1916
1904
@@ -1921,7 +1909,6 @@ function Build-Testing([Platform]$Platform, $Arch, [switch]$Test = $false) {
1921
1909
- Arch $Arch `
1922
1910
- Platform $Platform `
1923
1911
- UseBuiltCompilers C, CXX, Swift `
1924
- - BuildTargets $Targets `
1925
1912
- Defines (@ {
1926
1913
BUILD_SHARED_LIBS = " YES" ;
1927
1914
CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
@@ -2020,7 +2007,6 @@ function Build-SQLite($Arch) {
2020
2007
- InstallTo $LibraryRoot \sqlite- 3.46 .0 \usr `
2021
2008
- Arch $Arch `
2022
2009
- UseMSVCCompilers C `
2023
- - BuildTargets default `
2024
2010
- Defines @ {
2025
2011
BUILD_SHARED_LIBS = " NO" ;
2026
2012
}
@@ -2035,7 +2021,6 @@ function Build-System($Arch) {
2035
2021
- Platform Windows `
2036
2022
- UseBuiltCompilers C, Swift `
2037
2023
- SwiftSDK (Get-HostSwiftSDK ) `
2038
- - BuildTargets default `
2039
2024
- Defines @ {
2040
2025
BUILD_SHARED_LIBS = " YES" ;
2041
2026
}
@@ -2055,7 +2040,6 @@ function Build-ToolsSupportCore($Arch) {
2055
2040
- Platform Windows `
2056
2041
- UseBuiltCompilers C, Swift `
2057
2042
- SwiftSDK (Get-HostSwiftSDK ) `
2058
- - BuildTargets default `
2059
2043
- Defines @ {
2060
2044
BUILD_SHARED_LIBS = " YES" ;
2061
2045
SwiftSystem_DIR = (Get-HostProjectCMakeModules System);
@@ -2081,7 +2065,7 @@ function Build-LLBuild($Arch, [switch]$Test = $false) {
2081
2065
$env: CLANG = ([IO.Path ]::Combine((Get-HostProjectBinaryCache Compilers), " bin" , " clang.exe" ))
2082
2066
$InstallPath = " "
2083
2067
} else {
2084
- $Targets = @ (" default " )
2068
+ $Targets = @ ()
2085
2069
$TestingDefines = @ {}
2086
2070
$InstallPath = " $ ( $Arch.ToolchainInstallRoot ) \usr"
2087
2071
}
@@ -2129,7 +2113,6 @@ function Build-ArgumentParser($Arch) {
2129
2113
- Platform Windows `
2130
2114
- UseBuiltCompilers Swift `
2131
2115
- SwiftSDK (Get-HostSwiftSDK ) `
2132
- - BuildTargets default `
2133
2116
- Defines @ {
2134
2117
BUILD_SHARED_LIBS = " YES" ;
2135
2118
BUILD_TESTING = " NO" ;
@@ -2145,7 +2128,6 @@ function Build-Driver($Arch) {
2145
2128
- Platform Windows `
2146
2129
- UseBuiltCompilers C, CXX, Swift `
2147
2130
- SwiftSDK (Get-HostSwiftSDK ) `
2148
- - BuildTargets default `
2149
2131
- Defines @ {
2150
2132
BUILD_SHARED_LIBS = " YES" ;
2151
2133
SwiftSystem_DIR = (Get-HostProjectCMakeModules System);
@@ -2185,7 +2167,6 @@ function Build-Collections($Arch) {
2185
2167
- Platform Windows `
2186
2168
- UseBuiltCompilers C, Swift `
2187
2169
- SwiftSDK (Get-HostSwiftSDK ) `
2188
- - BuildTargets default `
2189
2170
- Defines @ {
2190
2171
BUILD_SHARED_LIBS = " YES" ;
2191
2172
}
@@ -2235,7 +2216,6 @@ function Build-PackageManager($Arch) {
2235
2216
- Platform Windows `
2236
2217
- UseBuiltCompilers C, Swift `
2237
2218
- SwiftSDK (Get-HostSwiftSDK ) `
2238
- - BuildTargets default `
2239
2219
- Defines @ {
2240
2220
BUILD_SHARED_LIBS = " YES" ;
2241
2221
CMAKE_Swift_FLAGS = @ (" -DCRYPTO_v2" );
@@ -2263,7 +2243,6 @@ function Build-Markdown($Arch) {
2263
2243
- Platform Windows `
2264
2244
- UseBuiltCompilers C, Swift `
2265
2245
- SwiftSDK (Get-HostSwiftSDK ) `
2266
- - BuildTargets default `
2267
2246
- Defines @ {
2268
2247
BUILD_SHARED_LIBS = " NO" ;
2269
2248
ArgumentParser_DIR = (Get-HostProjectCMakeModules ArgumentParser);
@@ -2281,7 +2260,6 @@ function Build-Format($Arch) {
2281
2260
- UseMSVCCompilers C `
2282
2261
- UseBuiltCompilers Swift `
2283
2262
- SwiftSDK (Get-HostSwiftSDK ) `
2284
- - BuildTargets default `
2285
2263
- Defines @ {
2286
2264
BUILD_SHARED_LIBS = " YES" ;
2287
2265
ArgumentParser_DIR = (Get-HostProjectCMakeModules ArgumentParser);
@@ -2318,7 +2296,6 @@ function Build-SourceKitLSP($Arch) {
2318
2296
- Platform Windows `
2319
2297
- UseBuiltCompilers C, Swift `
2320
2298
- SwiftSDK (Get-HostSwiftSDK ) `
2321
- - BuildTargets default `
2322
2299
- Defines @ {
2323
2300
SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
2324
2301
SwiftSystem_DIR = (Get-HostProjectCMakeModules System);
@@ -2361,8 +2338,10 @@ function Build-TestingMacros() {
2361
2338
}
2362
2339
2363
2340
$InstallDir = $null
2341
+ $Targets = @ (" default" )
2364
2342
if (-not $Build ) {
2365
2343
$InstallDir = " $ ( $Arch.ToolchainInstallRoot ) \usr"
2344
+ $Targets = @ ()
2366
2345
}
2367
2346
2368
2347
$SwiftSyntaxCMakeModules = if ($Build -and $HostArch -ne $BuildArch ) {
@@ -2379,7 +2358,7 @@ function Build-TestingMacros() {
2379
2358
- Platform $Platform `
2380
2359
- UseBuiltCompilers Swift `
2381
2360
- SwiftSDK:$SwiftSDK `
2382
- - BuildTargets $Targets `
2361
+ - BuildTargets: $Targets `
2383
2362
- Defines @ {
2384
2363
SwiftSyntax_DIR = $SwiftSyntaxCMakeModules ;
2385
2364
}
0 commit comments