Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build.ps1] build swift-lmdb using cmake #77562

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,17 @@ function Test-Format {
}
}

function Build-LMDB() {
Build-SPMProject `
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be Build-CMakeProject? This doesn't match the commit message. Do you have numbers for what the toolchain size impact is on static vs dynamic builds?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Admittedly I'm quite new to this and haven't been able to compile Swift on Windows at all. So, I don't have those numbers right now.

-Action Build `
-Src $SourceCache\swift-lmdb `
-Bin (Get-HostProjectBinaryCache LMDB) `
-Arch $HostArch `
-Platform Windows `
-UseBuiltCompilers C `
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to use clang-cl instead of cl here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason. I've updated this patch to use the same approach you took in #71422.

One question about that PR: how close is it to being able to merge? I realize that the next step of this will probably be to get a cmake build of swift-docc working since the goal is to use swift-docc as a dependency to SourceKit-LSP which currently has a cmake build.

-BuildTargets default
}

function Build-IndexStoreDB($Arch) {
$SDKInstallRoot = (Get-HostSwiftSDK);

Expand Down Expand Up @@ -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
compnerd marked this conversation as resolved.
Show resolved Hide resolved
Invoke-BuildStep Build-SourceKitLSP $HostArch
}
Expand Down