Skip to content

Commit 749a5a2

Browse files
committed
utils: adjust Windows build to use shared LMDB
This adjusts the build to create a shared (static) build of LMDB. Re-order the build rules, wire up the LMDB build into IndexStoreDB and SourceKit-LSP.
1 parent 201edb8 commit 749a5a2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

utils/build.ps1

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ enum HostComponent {
449449
PackageManager
450450
Markdown
451451
Format
452+
LMDB
452453
IndexStoreDB
453454
SourceKitLSP
454-
LMDB
455455
SymbolKit
456456
DocC
457457
}
@@ -2439,6 +2439,15 @@ function Test-Format {
24392439
}
24402440
}
24412441

2442+
function Build-LMDB($Arch) {
2443+
Build-CMakeProject `
2444+
-Src $SourceCache\swift-lmdb `
2445+
-Bin (Get-HostProjectBinaryCache LMDB) `
2446+
-Arch $Arch `
2447+
-UseMSVCCompilers C `
2448+
-BuildTargets default
2449+
}
2450+
24422451
function Build-IndexStoreDB($Arch) {
24432452
$SDKInstallRoot = (Get-HostSwiftSDK);
24442453

@@ -2454,6 +2463,7 @@ function Build-IndexStoreDB($Arch) {
24542463
BUILD_SHARED_LIBS = "NO";
24552464
CMAKE_C_FLAGS = @("-I$SDKInstallRoot\usr\include", "-I$SDKInstallRoot\usr\include\Block");
24562465
CMAKE_CXX_FLAGS = @("-I$SDKInstallRoot\usr\include", "-I$SDKInstallRoot\usr\include\Block");
2466+
LMDB_DIR = (Get-HostProjectCMakeModules LMDB);
24572467
}
24582468
}
24592469

@@ -2475,6 +2485,7 @@ function Build-SourceKitLSP($Arch) {
24752485
SwiftCrypto_DIR = (Get-HostProjectCMakeModules Crypto);
24762486
SwiftCollections_DIR = (Get-HostProjectCMakeModules Collections);
24772487
SwiftPM_DIR = (Get-HostProjectCMakeModules PackageManager);
2488+
LMDB_DIR = (Get-HostProjectCMakeModules LMDB);
24782489
IndexStoreDB_DIR = (Get-HostProjectCMakeModules IndexStoreDB);
24792490
}
24802491
}
@@ -2837,6 +2848,7 @@ if (-not $SkipBuild) {
28372848
Invoke-BuildStep Build-PackageManager $HostArch
28382849
Invoke-BuildStep Build-Markdown $HostArch
28392850
Invoke-BuildStep Build-Format $HostArch
2851+
Invoke-BuildStep Build-LMDB $HostArch
28402852
Invoke-BuildStep Build-IndexStoreDB $HostArch
28412853
Invoke-BuildStep Build-SourceKitLSP $HostArch
28422854
}

0 commit comments

Comments
 (0)