From 506b79e38d0084d561da2dc765fd111697ad13b6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Tue, 12 Nov 2024 13:35:23 -0500 Subject: [PATCH 1/4] build swift-lmdb using cmake --- utils/build.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/utils/build.ps1 b/utils/build.ps1 index b76933e98a8ef..1d40f512e4883 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -2439,6 +2439,17 @@ function Test-Format { } } +function Build-LMDB() { + Build-SPMProject ` + -Action Build ` + -Src $SourceCache\swift-lmdb ` + -Bin (Get-HostProjectBinaryCache LMDB) ` + -Arch $HostArch ` + -Platform Windows ` + -UseBuiltCompilers C ` + -BuildTargets default +} + function Build-IndexStoreDB($Arch) { $SDKInstallRoot = (Get-HostSwiftSDK); @@ -2837,6 +2848,7 @@ if (-not $SkipBuild) { Invoke-BuildStep Build-PackageManager $HostArch Invoke-BuildStep Build-Markdown $HostArch Invoke-BuildStep Build-Format $HostArch + Invoke-BuildStep Build-LMDB $HostArch Invoke-BuildStep Build-IndexStoreDB $HostArch Invoke-BuildStep Build-SourceKitLSP $HostArch } From 4f605ad4d6e4aeb25953e52e0e9a0c1759436a1b Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Tue, 12 Nov 2024 18:54:03 -0500 Subject: [PATCH 2/4] use Build-CMakeProject instead of Build-SPMProject --- utils/build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index 1d40f512e4883..9dd808cee36e5 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -2440,7 +2440,7 @@ function Test-Format { } function Build-LMDB() { - Build-SPMProject ` + Build-CMakeProject ` -Action Build ` -Src $SourceCache\swift-lmdb ` -Bin (Get-HostProjectBinaryCache LMDB) ` From edeef31b1b47676978d05c042432ebcf58b8e6a6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Tue, 12 Nov 2024 21:36:11 -0500 Subject: [PATCH 3/4] add define for LMDB_DIR when building indexstore-db --- utils/build.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/build.ps1 b/utils/build.ps1 index 9dd808cee36e5..4550a3d2eade2 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -2465,6 +2465,7 @@ function Build-IndexStoreDB($Arch) { BUILD_SHARED_LIBS = "NO"; CMAKE_C_FLAGS = @("-I$SDKInstallRoot\usr\include", "-I$SDKInstallRoot\usr\include\Block"); CMAKE_CXX_FLAGS = @("-I$SDKInstallRoot\usr\include", "-I$SDKInstallRoot\usr\include\Block"); + LMDB_DIR = (Get-HostProjectCMakeModules LMDB); } } From 4d937c8376363e2ea4afbdfc7e17ccafee6d37f3 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 13 Nov 2024 09:03:25 -0500 Subject: [PATCH 4/4] fix lmdb build --- utils/build.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index 4550a3d2eade2..6053c5ec73d68 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -2439,14 +2439,12 @@ function Test-Format { } } -function Build-LMDB() { +function Build-LMDB($Arch) { Build-CMakeProject ` - -Action Build ` -Src $SourceCache\swift-lmdb ` -Bin (Get-HostProjectBinaryCache LMDB) ` - -Arch $HostArch ` - -Platform Windows ` - -UseBuiltCompilers C ` + -Arch $Arch ` + -UseMSVCCompilers C ` -BuildTargets default }