diff --git a/utils/build.ps1 b/utils/build.ps1 index 7ceab4733b68..81cfae00d179 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -851,6 +851,7 @@ enum Project { Certificates System Subprocess + ToolsProtocols Build PackageManager PackageManagerRuntime @@ -3446,6 +3447,21 @@ function Build-Subprocess([Hashtable] $Platform) { } } +function Build-ToolsProtocols([Hashtable] $Platform) { + $SDKROOT = Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK + Build-CMakeProject ` + -Src $SourceCache\swift-tools-protocols ` + -Bin (Get-ProjectBinaryCache $Platform ToolsProtocols) ` + -Platform $Platform ` + -UseBuiltCompilers C,CXX,Swift ` + -SwiftSDK $SDKROOT ` + -BuildTargets default ` + -Defines @{ + BUILD_SHARED_LIBS = "NO"; + CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + } +} + function Build-Build([Hashtable] $Platform) { # Use lld to workaround the ARM64 LNK1322 issue: https://github.com/swiftlang/swift/issues/79740 # FIXME(hjyamauchi) Have a real fix @@ -3466,6 +3482,7 @@ function Build-Build([Hashtable] $Platform) { SwiftDriver_DIR = (Get-ProjectCMakeModules $Platform Driver); SwiftSystem_DIR = (Get-ProjectCMakeModules $Platform System); TSC_DIR = (Get-ProjectCMakeModules $Platform ToolsSupportCore); + SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols); SQLite3_INCLUDE_DIR = "$SourceCache\swift-toolchain-sqlite\Sources\CSQLite\include"; SQLite3_LIBRARY = "$(Get-ProjectBinaryCache $Platform SQLite)\SQLite3.lib"; } + $ArchSpecificOptions) @@ -3659,6 +3676,7 @@ function Build-PackageManager([Hashtable] $Platform) { ArgumentParser_DIR = (Get-ProjectCMakeModules $Platform ArgumentParser); SwiftDriver_DIR = (Get-ProjectCMakeModules $Platform Driver); SwiftBuild_DIR = (Get-ProjectCMakeModules $Platform Build); + SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols); SwiftCrypto_DIR = (Get-ProjectCMakeModules $Platform Crypto); SwiftCollections_DIR = (Get-ProjectCMakeModules $Platform Collections); SwiftASN1_DIR = (Get-ProjectCMakeModules $Platform ASN1); @@ -3812,6 +3830,7 @@ function Build-SourceKitLSP([Hashtable] $Platform) { SwiftPM_DIR = (Get-ProjectCMakeModules $Platform PackageManager); LMDB_DIR = (Get-ProjectCMakeModules $Platform LMDB); IndexStoreDB_DIR = (Get-ProjectCMakeModules $Platform IndexStoreDB); + SwiftToolsProtocols_DIR = (Get-ProjectCMakeModules $Platform ToolsProtocols); } } @@ -3870,6 +3889,14 @@ function Test-SourceKitLSP { "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_Index\Index.lib", "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_LLVMSupport\LLVMSupport.lib", "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform IndexStoreDB)\Sources\IndexStoreDB_Support\Support.lib", + # swift-tools-protocols + "-Xswiftc", "-I$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\swift", + "-Xlinker", "-L$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib", + "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib\libBuildServerProtocol.lib", + "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib\libLanguageServerProtocol.lib", + "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib\libLanguageServerProtocolTransport.lib", + "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib\libSKLogging.lib", + "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib\libToolsProtocolsSwiftExtensions.lib", # LMDB "-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform LMDB)\lib\CLMDB.lib", # sourcekit-lsp @@ -4331,6 +4358,7 @@ if (-not $SkipBuild) { Invoke-BuildStep Build-Certificates $HostPlatform Invoke-BuildStep Build-System $HostPlatform Invoke-BuildStep Build-Subprocess $HostPlatform + Invoke-BuildStep Build-ToolsProtocols $HostPlatform Invoke-BuildStep Build-Build $HostPlatform Invoke-BuildStep Build-PackageManager $HostPlatform Invoke-BuildStep Build-Markdown $HostPlatform diff --git a/utils/update_checkout/update-checkout-config.json b/utils/update_checkout/update-checkout-config.json index 59df15fb4bc5..05f8766eeba1 100644 --- a/utils/update_checkout/update-checkout-config.json +++ b/utils/update_checkout/update-checkout-config.json @@ -145,7 +145,7 @@ "llbuild": "main", "swift-build": "main", "swift-toolchain-sqlite": "1.0.7", - "swift-tools-protocols": "0.0.2", + "swift-tools-protocols": "0.0.4", "swift-tools-support-core": "main", "swiftpm": "main", "swift-argument-parser": "1.5.1", @@ -513,7 +513,7 @@ "swift-nio-ssl": "2.15.0", "swift-experimental-string-processing": "swift/release/6.0", "wasi-libc": "wasi-sdk-20", - "wasmkit": "0.0.3", + "wasmkit": "0.0.4", "curl": "curl-8_4_0", "icu": "maint/maint-69", "libxml2": "v2.11.5", @@ -577,7 +577,7 @@ "llbuild": "main", "swift-build": "main", "swift-toolchain-sqlite": "1.0.7", - "swift-tools-protocols": "0.0.2", + "swift-tools-protocols": "0.0.4", "swift-tools-support-core": "main", "swiftpm": "main", "swift-argument-parser": "1.5.1", @@ -638,7 +638,7 @@ "llbuild": "main", "swift-build": "main", "swift-toolchain-sqlite": "1.0.7", - "swift-tools-protocols": "0.0.2", + "swift-tools-protocols": "0.0.4", "swift-tools-support-core": "main", "swiftpm": "main", "swift-argument-parser": "1.5.1",