@@ -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+
34793493function 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
0 commit comments