Skip to content

Commit 5f253a7

Browse files
committed
build.ps1: add swift-tools-protocols
1 parent 3a0b392 commit 5f253a7

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

utils/build.ps1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@ enum Project {
851851
Certificates
852852
System
853853
Subprocess
854+
ToolsProtocols
854855
Build
855856
PackageManager
856857
PackageManagerRuntime
@@ -3446,6 +3447,20 @@ function Build-Subprocess([Hashtable] $Platform) {
34463447
}
34473448
}
34483449

3450+
function Build-ToolsProtocols([Hashtable] $Platform) {
3451+
Build-CMakeProject `
3452+
-Src $SourceCache\swift-tools-protocols `
3453+
-Bin (Get-ProjectBinaryCache $Platform ToolsProtocols) `
3454+
-InstallTo "$($Platform.ToolchainInstallRoot)\usr" `
3455+
-Platform $Platform `
3456+
-UseBuiltCompilers C,CXX,Swift `
3457+
-SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) `
3458+
-BuildTargets default `
3459+
-Defines @{
3460+
BUILD_SHARED_LIBS = "YES";
3461+
}
3462+
}
3463+
34493464
function Build-Build([Hashtable] $Platform) {
34503465
# Use lld to workaround the ARM64 LNK1322 issue: https://github.com/swiftlang/swift/issues/79740
34513466
# FIXME(hjyamauchi) Have a real fix
@@ -3466,6 +3481,7 @@ function Build-Build([Hashtable] $Platform) {
34663481
SwiftDriver_DIR = (Get-ProjectCMakeModules $Platform Driver);
34673482
SwiftSystem_DIR = (Get-ProjectCMakeModules $Platform System);
34683483
TSC_DIR = (Get-ProjectCMakeModules $Platform ToolsSupportCore);
3484+
SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols);
34693485
SQLite3_INCLUDE_DIR = "$SourceCache\swift-toolchain-sqlite\Sources\CSQLite\include";
34703486
SQLite3_LIBRARY = "$(Get-ProjectBinaryCache $Platform SQLite)\SQLite3.lib";
34713487
} + $ArchSpecificOptions)
@@ -3659,6 +3675,7 @@ function Build-PackageManager([Hashtable] $Platform) {
36593675
ArgumentParser_DIR = (Get-ProjectCMakeModules $Platform ArgumentParser);
36603676
SwiftDriver_DIR = (Get-ProjectCMakeModules $Platform Driver);
36613677
SwiftBuild_DIR = (Get-ProjectCMakeModules $Platform Build);
3678+
SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols);
36623679
SwiftCrypto_DIR = (Get-ProjectCMakeModules $Platform Crypto);
36633680
SwiftCollections_DIR = (Get-ProjectCMakeModules $Platform Collections);
36643681
SwiftASN1_DIR = (Get-ProjectCMakeModules $Platform ASN1);
@@ -3812,6 +3829,7 @@ function Build-SourceKitLSP([Hashtable] $Platform) {
38123829
SwiftPM_DIR = (Get-ProjectCMakeModules $Platform PackageManager);
38133830
LMDB_DIR = (Get-ProjectCMakeModules $Platform LMDB);
38143831
IndexStoreDB_DIR = (Get-ProjectCMakeModules $Platform IndexStoreDB);
3832+
SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols);
38153833
}
38163834
}
38173835

@@ -3870,6 +3888,10 @@ function Test-SourceKitLSP {
38703888
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_Index\Index.lib",
38713889
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_LLVMSupport\LLVMSupport.lib",
38723890
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_Support\Support.lib",
3891+
# swift-tools-protocols
3892+
"-Xswiftc", "-I$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\swift",
3893+
"-Xswiftc", "-I$SourceCache\swift-tools-protocols\Sources\ToolsProtocolsCAtomics\include",
3894+
"-Xlinker", "-L$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib",
38733895
# LMDB
38743896
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform LMDB)\lib\CLMDB.lib",
38753897
# sourcekit-lsp
@@ -4331,6 +4353,7 @@ if (-not $SkipBuild) {
43314353
Invoke-BuildStep Build-Certificates $HostPlatform
43324354
Invoke-BuildStep Build-System $HostPlatform
43334355
Invoke-BuildStep Build-Subprocess $HostPlatform
4356+
Invoke-BuildStep Build-ToolsProtocols $HostPlatform
43344357
Invoke-BuildStep Build-Build $HostPlatform
43354358
Invoke-BuildStep Build-PackageManager $HostPlatform
43364359
Invoke-BuildStep Build-Markdown $HostPlatform

utils/update_checkout/update-checkout-config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"llbuild": "main",
146146
"swift-build": "main",
147147
"swift-toolchain-sqlite": "1.0.7",
148-
"swift-tools-protocols": "0.0.2",
148+
"swift-tools-protocols": "0.0.6",
149149
"swift-tools-support-core": "main",
150150
"swiftpm": "main",
151151
"swift-argument-parser": "1.5.1",
@@ -577,7 +577,7 @@
577577
"llbuild": "main",
578578
"swift-build": "main",
579579
"swift-toolchain-sqlite": "1.0.7",
580-
"swift-tools-protocols": "0.0.2",
580+
"swift-tools-protocols": "0.0.6",
581581
"swift-tools-support-core": "main",
582582
"swiftpm": "main",
583583
"swift-argument-parser": "1.5.1",
@@ -638,7 +638,7 @@
638638
"llbuild": "main",
639639
"swift-build": "main",
640640
"swift-toolchain-sqlite": "1.0.7",
641-
"swift-tools-protocols": "0.0.2",
641+
"swift-tools-protocols": "0.0.6",
642642
"swift-tools-support-core": "main",
643643
"swiftpm": "main",
644644
"swift-argument-parser": "1.5.1",

0 commit comments

Comments
 (0)