@@ -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+
24422451function 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,19 +2485,23 @@ 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}
24812492
24822493function Test-SourceKitLSP {
24832494 $SwiftPMArguments = @ (
2495+ # dispatch
2496+ " -Xcc" , " -I$SourceCache \swift-corelibs-libdispatch" ,
2497+ " -Xcc" , " -I$SourceCache \swift-corelibs-libdispatch\src\BlocksRuntime" ,
24842498 # swift-syntax
24852499 " -Xswiftc" , " -I$ ( Get-HostProjectBinaryCache Compilers) \lib\swift\host" ,
24862500 " -Xswiftc" , " -L$ ( Get-HostProjectBinaryCache Compilers) \lib\swift\host" ,
24872501 # swift-cmark
2488- " -Xswiftc" , " -I$ ( $ SourceCache) \cmark\src\include" ,
2489- " -Xswiftc" , " -I$ ( $ SourceCache) \cmark\extensions\include" ,
2490- " -Xlinker" , " -I$ ( $ SourceCache) \cmark\extensions\include" ,
2502+ " -Xswiftc" , " -I$SourceCache \cmark\src\include" ,
2503+ " -Xswiftc" , " -I$SourceCache \cmark\extensions\include" ,
2504+ " -Xlinker" , " -I$SourceCache \cmark\extensions\include" ,
24912505 " -Xlinker" , " $ ( Get-CMarkBinaryCache $HostArch ) \src\cmark-gfm.lib" ,
24922506 " -Xlinker" , " $ ( Get-CMarkBinaryCache $HostArch ) \extensions\cmark-gfm-extensions.lib" ,
24932507 # swift-system
@@ -2528,6 +2542,8 @@ function Test-SourceKitLSP {
25282542 " -Xlinker" , " $ ( Get-HostProjectBinaryCache IndexStoreDB) \lib\Index\Index.lib" ,
25292543 " -Xlinker" , " $ ( Get-HostProjectBinaryCache IndexStoreDB) \lib\LLVMSupport\LLVMSupport.lib" ,
25302544 " -Xlinker" , " $ ( Get-HostProjectBinaryCache IndexStoreDB) \lib\Support\Support.lib" ,
2545+ # LMDB
2546+ " -Xlinker" , " $ ( Get-HostProjectBinaryCache LMDB) \lib\CLMDB.lib" ,
25312547 # sourcekit-lsp
25322548 " -Xswiftc" , " -I$ ( $SourceCache ) \sourcekit-lsp\Sources\CAtomics\include" ,
25332549 " -Xswiftc" , " -I$ ( $SourceCache ) \sourcekit-lsp\Sources\CSourcekitd\include" ,
@@ -2837,6 +2853,7 @@ if (-not $SkipBuild) {
28372853 Invoke-BuildStep Build-PackageManager $HostArch
28382854 Invoke-BuildStep Build-Markdown $HostArch
28392855 Invoke-BuildStep Build-Format $HostArch
2856+ Invoke-BuildStep Build-LMDB $HostArch
28402857 Invoke-BuildStep Build-IndexStoreDB $HostArch
28412858 Invoke-BuildStep Build-SourceKitLSP $HostArch
28422859}
0 commit comments