Skip to content

Commit bdf6626

Browse files
committed
utils: avoid double staging the experimental SDK
Install the experimental SDK directly into the final install/stage so that we have a complete working toolchain that we can directly package.
1 parent 61c115f commit bdf6626

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

utils/build.ps1

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ $ArchX64 = @{
241241
LLVMTarget = "x86_64-unknown-windows-msvc";
242242
CMakeName = "AMD64";
243243
BinaryDir = "bin64";
244-
ExperimentalSDKInstallRoot = "$BinaryCache\x64\Windows.platform\Developer\SDKs\WindowsExperimental.sdk";
245244
XCTestInstallRoot = "$BinaryCache\x64\Windows.platform\Developer\Library\XCTest-development";
246245
SwiftTestingInstallRoot = "$BinaryCache\x64\Windows.platform\Developer\Library\Testing-development";
247246
ToolchainInstallRoot = "$BinaryCache\x64\toolchains\$ProductVersion+$Variant";
@@ -255,7 +254,6 @@ $ArchX86 = @{
255254
LLVMTarget = "i686-unknown-windows-msvc";
256255
CMakeName = "i686";
257256
BinaryDir = "bin32";
258-
ExperimentalSDKInstallRoot = "$BinaryCache\x86\Windows.platform\Developer\SDKs\WindowsExperimental.sdk";
259257
XCTestInstallRoot = "$BinaryCache\x86\Windows.platform\Developer\Library\XCTest-development";
260258
SwiftTestingInstallRoot = "$BinaryCache\x86\Windows.platform\Developer\Library\Testing-development";
261259
Cache = @{};
@@ -268,7 +266,6 @@ $ArchARM64 = @{
268266
LLVMTarget = "aarch64-unknown-windows-msvc";
269267
CMakeName = "ARM64";
270268
BinaryDir = "bin64a";
271-
ExperimentalSDKInstallRoot = "$BinaryCache\arm64\Windows.platform\Developer\SDKs\WindowsExperimental.sdk";
272269
XCTestInstallRoot = "$BinaryCache\arm64\Windows.platform\Developer\Library\XCTest-development";
273270
ToolchainInstallRoot = "$BinaryCache\arm64\toolchains\$ProductVersion+$Variant";
274271
SwiftTestingInstallRoot = "$BinaryCache\arm64\Windows.platform\Developer\Library\Testing-development";
@@ -282,7 +279,6 @@ $AndroidARM64 = @{
282279
LLVMName = "aarch64";
283280
LLVMTarget = "aarch64-unknown-linux-android$AndroidAPILevel";
284281
ShortName = "arm64";
285-
ExperimentalSDKInstallRoot = "$BinaryCache\arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk";
286282
XCTestInstallRoot = "$BinaryCache\arm64\Android.platform\Developer\Library\XCTest-development";
287283
SwiftTestingInstallRoot = "$BinaryCache\arm64\Android.platform\Developer\Library\Testing-development";
288284
Cache = @{};
@@ -295,7 +291,6 @@ $AndroidARMv7 = @{
295291
LLVMName = "armv7";
296292
LLVMTarget = "armv7-unknown-linux-androideabi$AndroidAPILevel";
297293
ShortName = "armv7";
298-
ExperimentalSDKInstallRoot = "$BinaryCache\arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk";
299294
XCTestInstallRoot = "$BinaryCache\armv7\Android.platform\Developer\Library\XCTest-development";
300295
SwiftTestingInstallRoot = "$BinaryCache\armv7\Android.platform\Developer\Library\Testing-development";
301296
Cache = @{};
@@ -308,7 +303,6 @@ $AndroidX86 = @{
308303
LLVMName = "i686";
309304
LLVMTarget = "i686-unknown-linux-android$AndroidAPILevel";
310305
ShortName = "x86";
311-
ExperimentalSDKInstallRoot = "$BinaryCache\arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk";
312306
XCTestInstallRoot = "$BinaryCache\x86\Android.platform\Developer\Library\XCTest-development";
313307
SwiftTestingInstallRoot = "$BinaryCache\x86\Android.platform\Developer\Library\Testing-development";
314308
Cache = @{};
@@ -321,7 +315,6 @@ $AndroidX64 = @{
321315
LLVMName = "x86_64";
322316
LLVMTarget = "x86_64-unknown-linux-android$AndroidAPILevel";
323317
ShortName = "x64";
324-
ExperimentalSDKInstallRoot = "$BinaryCache\arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk";
325318
XCTestInstallRoot = "$BinaryCache\x64\Android.platform\Developer\Library\XCTest-development";
326319
SwiftTestingInstallRoot = "$BinaryCache\x64\Android.platform\Developer\Library\Testing-development";
327320
Cache = @{};
@@ -1010,9 +1003,9 @@ function Get-SwiftSDK {
10101003
(
10111004
[Parameter(Position = 0, Mandatory = $true)]
10121005
[Platform] $Platform,
1013-
[switch] $Experimental = $false
1006+
[string] $Identifier = $Platform.ToString()
10141007
)
1015-
return ([IO.Path]::Combine((Get-PlatformRoot $Platform), "Developer", "SDKs", "${Platform}.sdk"))
1008+
return ([IO.Path]::Combine((Get-PlatformRoot $Platform), "Developer", "SDKs", "${Identifier}.sdk"))
10161009
}
10171010

10181011
function Build-CMakeProject {
@@ -2140,7 +2133,7 @@ function Build-ExperimentalRuntime {
21402133
Build-CMakeProject `
21412134
-Src $SourceCache\swift\Runtimes\Core `
21422135
-Bin (Get-TargetProjectBinaryCache $Arch ExperimentalRuntime) `
2143-
-InstallTo "$($Arch.ExperimentalSDKInstallRoot)\usr" `
2136+
-InstallTo "$(Get-SwiftSDK $Platform -Identifier "${Platform}Experimental")\usr" `
21442137
-Arch $Arch `
21452138
-Platform $Platform `
21462139
-UseBuiltCompilers C,CXX,Swift `
@@ -2252,7 +2245,7 @@ function Build-Foundation {
22522245
Build-CMakeProject `
22532246
-Src $SourceCache\swift-corelibs-foundation `
22542247
-Bin $FoundationBinaryCache `
2255-
-InstallTo $(if ($Static) { "$($Arch.ExperimentalSDKInstallRoot)\usr" } else { "$(Get-SwiftSDK $Platform)\usr" }) `
2248+
-InstallTo $(if ($Static) { "$(Get-SwiftSDK $Platform -Identifier "${Platform}Experimental")\usr" } else { "$(Get-SwiftSDK $Platform)\usr" }) `
22562249
-Arch $Arch `
22572250
-Platform $Platform `
22582251
-UseBuiltCompilers ASM,C,CXX,Swift `

0 commit comments

Comments
 (0)