Skip to content

Commit a8c6c96

Browse files
authored
Merge pull request #85078 from owenv/owenv/tools-protocols-windows
build.ps1: add swift-tools-protocols
2 parents 0287d65 + c12d5a7 commit a8c6c96

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

utils/build.ps1

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ enum Project {
859859
Certificates
860860
System
861861
Subprocess
862+
ToolsProtocols
862863
Build
863864
PackageManager
864865
PackageManagerRuntime
@@ -3476,6 +3477,19 @@ function Build-Subprocess([Hashtable] $Platform) {
34763477
}
34773478
}
34783479

3480+
function Build-ToolsProtocols([Hashtable] $Platform) {
3481+
Build-CMakeProject `
3482+
-Src $SourceCache\swift-tools-protocols `
3483+
-Bin (Get-ProjectBinaryCache $Platform ToolsProtocols) `
3484+
-InstallTo "$($Platform.ToolchainInstallRoot)\usr" `
3485+
-Platform $Platform `
3486+
-UseBuiltCompilers C,CXX,Swift `
3487+
-SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) `
3488+
-Defines @{
3489+
BUILD_SHARED_LIBS = "YES";
3490+
}
3491+
}
3492+
34793493
function Build-Build([Hashtable] $Platform) {
34803494
# Use lld to workaround the ARM64 LNK1322 issue: https://github.com/swiftlang/swift/issues/79740
34813495
# FIXME(hjyamauchi) Have a real fix
@@ -3496,6 +3510,7 @@ function Build-Build([Hashtable] $Platform) {
34963510
SwiftDriver_DIR = (Get-ProjectCMakeModules $Platform Driver);
34973511
SwiftSystem_DIR = (Get-ProjectCMakeModules $Platform System);
34983512
TSC_DIR = (Get-ProjectCMakeModules $Platform ToolsSupportCore);
3513+
SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols);
34993514
SQLite3_INCLUDE_DIR = "$SourceCache\swift-toolchain-sqlite\Sources\CSQLite\include";
35003515
SQLite3_LIBRARY = "$(Get-ProjectBinaryCache $Platform SQLite)\SQLite3.lib";
35013516
} + $ArchSpecificOptions)
@@ -3689,6 +3704,7 @@ function Build-PackageManager([Hashtable] $Platform) {
36893704
ArgumentParser_DIR = (Get-ProjectCMakeModules $Platform ArgumentParser);
36903705
SwiftDriver_DIR = (Get-ProjectCMakeModules $Platform Driver);
36913706
SwiftBuild_DIR = (Get-ProjectCMakeModules $Platform Build);
3707+
SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols);
36923708
SwiftCrypto_DIR = (Get-ProjectCMakeModules $Platform Crypto);
36933709
SwiftCollections_DIR = (Get-ProjectCMakeModules $Platform Collections);
36943710
SwiftASN1_DIR = (Get-ProjectCMakeModules $Platform ASN1);
@@ -3842,6 +3858,7 @@ function Build-SourceKitLSP([Hashtable] $Platform) {
38423858
SwiftPM_DIR = (Get-ProjectCMakeModules $Platform PackageManager);
38433859
LMDB_DIR = (Get-ProjectCMakeModules $Platform LMDB);
38443860
IndexStoreDB_DIR = (Get-ProjectCMakeModules $Platform IndexStoreDB);
3861+
SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols);
38453862
}
38463863
}
38473864

@@ -3900,6 +3917,10 @@ function Test-SourceKitLSP {
39003917
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_Index\Index.lib",
39013918
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_LLVMSupport\LLVMSupport.lib",
39023919
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_Support\Support.lib",
3920+
# swift-tools-protocols
3921+
"-Xswiftc", "-I$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\swift",
3922+
"-Xswiftc", "-I$SourceCache\swift-tools-protocols\Sources\ToolsProtocolsCAtomics\include",
3923+
"-Xlinker", "-L$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib",
39033924
# LMDB
39043925
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform LMDB)\lib\CLMDB.lib",
39053926
# sourcekit-lsp
@@ -4386,6 +4407,7 @@ if (-not $SkipBuild) {
43864407
Invoke-BuildStep Build-Certificates $HostPlatform
43874408
Invoke-BuildStep Build-System $HostPlatform
43884409
Invoke-BuildStep Build-Subprocess $HostPlatform
4410+
Invoke-BuildStep Build-ToolsProtocols $HostPlatform
43894411
Invoke-BuildStep Build-Build $HostPlatform
43904412
Invoke-BuildStep Build-PackageManager $HostPlatform
43914413
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.8",
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.8",
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.8",
642642
"swift-tools-support-core": "main",
643643
"swiftpm": "main",
644644
"swift-argument-parser": "1.5.1",

0 commit comments

Comments
 (0)