Merge nucleic/humble-fern-egret-60xo into dev
This commit is contained in:
@@ -74,10 +74,13 @@ function Initialize-SQLite {
|
||||
if (-not $Triplet) {
|
||||
# -static-md links SQLite statically against the DYNAMIC CRT — matching what the
|
||||
# Swift toolchain uses, so the CRT agrees and there's no sqlite3.dll to place
|
||||
# beside every test binary.
|
||||
# beside every test binary. `-nucleic` is our overlay triplet (windows/vcpkg-triplets):
|
||||
# same thing plus SQLITE_ENABLE_SNAPSHOT, which GRDB's system-SQLite path requires and
|
||||
# the stock port compiles out.
|
||||
$arch = if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { 'arm64' } else { 'x64' }
|
||||
$script:Triplet = "$arch-windows-static-md"
|
||||
$script:Triplet = "$arch-windows-static-md-nucleic"
|
||||
}
|
||||
$overlay = Join-Path $repo 'windows\vcpkg-triplets'
|
||||
|
||||
# `%LOCALAPPDATA%\vcpkg` is NOT a candidate install root, and must never be a clone target:
|
||||
# that path is vcpkg's own per-user DATA directory (registries, downloads, and the
|
||||
@@ -121,7 +124,7 @@ function Initialize-SQLite {
|
||||
$prefix = Join-Path $root "installed\$Triplet"
|
||||
if (-not (Test-Path (Join-Path $prefix 'include\sqlite3.h'))) {
|
||||
Write-Step "Installing sqlite3:$Triplet (one time, a few minutes)"
|
||||
& (Join-Path $root 'vcpkg.exe') install "sqlite3:$Triplet" | Out-Host
|
||||
& (Join-Path $root 'vcpkg.exe') install "sqlite3:$Triplet" "--overlay-triplets=$overlay" | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) { throw "vcpkg install sqlite3:$Triplet failed" }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# ARM64 twin of `x64-windows-static-md-nucleic.cmake` — see that file for why the define is here.
|
||||
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_C_FLAGS "/DSQLITE_ENABLE_SNAPSHOT")
|
||||
set(VCPKG_CXX_FLAGS "/DSQLITE_ENABLE_SNAPSHOT")
|
||||
@@ -0,0 +1,17 @@
|
||||
# Stock `x64-windows-static-md` (SQLite linked statically against the DYNAMIC CRT — the CRT the
|
||||
# Swift toolchain uses) PLUS `SQLITE_ENABLE_SNAPSHOT`.
|
||||
#
|
||||
# GRDB's system-SQLite path compiles `WALSnapshot.swift` and `DatabaseSnapshotPool.swift`
|
||||
# unconditionally, i.e. it assumes the platform SQLite exposes `sqlite3_snapshot_*`. That holds
|
||||
# for Apple's system SQLite and for typical Linux distro builds, but the vcpkg port ships stock
|
||||
# defaults, where the snapshot API is compiled out — so the Windows link fails with four
|
||||
# undefined symbols (`sqlite3_snapshot_open/get/free/cmp`) long after the library itself resolves.
|
||||
#
|
||||
# Used via `--overlay-triplets=windows/vcpkg-triplets` (windows/build.ps1, windows.yml). The
|
||||
# `-nucleic` suffix keeps this tree from colliding with a stock `x64-windows-static-md` install
|
||||
# in the same vcpkg root.
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_C_FLAGS "/DSQLITE_ENABLE_SNAPSHOT")
|
||||
set(VCPKG_CXX_FLAGS "/DSQLITE_ENABLE_SNAPSHOT")
|
||||
Reference in New Issue
Block a user