Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ enum Project {
Certificates
System
Subprocess
ToolsProtocols
Build
PackageManager
PackageManagerRuntime
Expand Down Expand Up @@ -3446,6 +3447,19 @@ function Build-Subprocess([Hashtable] $Platform) {
}
}

function Build-ToolsProtocols([Hashtable] $Platform) {
Build-CMakeProject `
-Src $SourceCache\swift-tools-protocols `
-Bin (Get-ProjectBinaryCache $Platform ToolsProtocols) `
-InstallTo "$($Platform.ToolchainInstallRoot)\usr" `
-Platform $Platform `
-UseBuiltCompilers C,CXX,Swift `
-SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) `
-Defines @{
BUILD_SHARED_LIBS = "YES";
}
}

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
Expand All @@ -3466,6 +3480,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)
Expand Down Expand Up @@ -3659,6 +3674,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);
Expand Down Expand Up @@ -3812,6 +3828,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);
}
}

Expand Down Expand Up @@ -3870,6 +3887,10 @@ 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",
"-Xswiftc", "-I$SourceCache\swift-tools-protocols\Sources\ToolsProtocolsCAtomics\include",
"-Xlinker", "-L$(Get-ProjectBinaryCache $BuildPlatform ToolsProtocols)\lib",
# LMDB
"-Xlinker", "$(Get-ProjectBinaryCache $BuildPlatform LMDB)\lib\CLMDB.lib",
# sourcekit-lsp
Expand Down Expand Up @@ -4331,6 +4352,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
Expand Down
6 changes: 3 additions & 3 deletions utils/update_checkout/update-checkout-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.7",
"swift-tools-support-core": "main",
"swiftpm": "main",
"swift-argument-parser": "1.5.1",
Expand Down Expand Up @@ -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.7",
"swift-tools-support-core": "main",
"swiftpm": "main",
"swift-argument-parser": "1.5.1",
Expand Down Expand Up @@ -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.7",
"swift-tools-support-core": "main",
"swiftpm": "main",
"swift-argument-parser": "1.5.1",
Expand Down