Merge nucleic/keen-maple-heron-yzg3 into dev
This commit is contained in:
@@ -119,10 +119,15 @@ function Initialize-SQLite {
|
|||||||
|
|
||||||
# ---------------------------------------------------------------- legs
|
# ---------------------------------------------------------------- legs
|
||||||
|
|
||||||
function Invoke-Swift([string[]]$SwiftArgs, [string]$LibPath) {
|
function Invoke-Swift([string[]]$SwiftArgs, [hashtable]$Sql) {
|
||||||
# -Xlinker only matters when something actually links (tests, executables); a library
|
# Both mechanisms, deliberately redundant. CPATH (set by Initialize-SQLite) is what makes
|
||||||
# build resolves purely through CPATH.
|
# a *bare* `swift build` work later, but passing -Xcc -I here means this script never
|
||||||
$full = @($SwiftArgs) + @('-Xlinker', "-LIBPATH:$LibPath")
|
# depends on clang honouring CPATH — if it didn't, the failure would be an inscrutable
|
||||||
|
# "'sqlite3.h' file not found" from inside GRDB's module build. -Xlinker only matters
|
||||||
|
# when something actually links (tests, executables); a library build needs just the -I.
|
||||||
|
$full = @($SwiftArgs) + @(
|
||||||
|
'-Xcc', "-I$($Sql.Include)",
|
||||||
|
'-Xlinker', "-LIBPATH:$($Sql.Lib)")
|
||||||
Write-Note "swift $($full -join ' ')"
|
Write-Note "swift $($full -join ' ')"
|
||||||
# Out-Host, not the pipeline: a native command's stdout would otherwise become this
|
# Out-Host, not the pipeline: a native command's stdout would otherwise become this
|
||||||
# function's return value, and the caller's exit-code check would see an array.
|
# function's return value, and the caller's exit-code check would see an array.
|
||||||
@@ -137,9 +142,9 @@ function Build-Protocol([hashtable]$sql) {
|
|||||||
try {
|
try {
|
||||||
Write-Step 'protocol: building NucleicProtocol'
|
Write-Step 'protocol: building NucleicProtocol'
|
||||||
$code = if ($Test) {
|
$code = if ($Test) {
|
||||||
Invoke-Swift @('test', '--filter', 'NucleicProtocolTests') $sql.Lib
|
Invoke-Swift @('test', '--filter', 'NucleicProtocolTests') $sql
|
||||||
} else {
|
} else {
|
||||||
Invoke-Swift @('build', '--target', 'NucleicProtocol') $sql.Lib
|
Invoke-Swift @('build', '--target', 'NucleicProtocol') $sql
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
Remove-Item Env:\NUCLEIC_WINDOWS_PROTOCOL_ONLY -ErrorAction SilentlyContinue
|
Remove-Item Env:\NUCLEIC_WINDOWS_PROTOCOL_ONLY -ErrorAction SilentlyContinue
|
||||||
@@ -150,8 +155,8 @@ function Build-Protocol([hashtable]$sql) {
|
|||||||
function Build-Core([hashtable]$sql) {
|
function Build-Core([hashtable]$sql) {
|
||||||
Write-Step 'core: building NucleicCore (full Windows manifest)'
|
Write-Step 'core: building NucleicCore (full Windows manifest)'
|
||||||
Write-Note 'Expected to fail until the §12 item 7-9 shims land — the errors ARE the M0 gap list.'
|
Write-Note 'Expected to fail until the §12 item 7-9 shims land — the errors ARE the M0 gap list.'
|
||||||
if ($Test) { return Invoke-Swift @('test', '--filter', 'NucleicCarbonTests') $sql.Lib }
|
if ($Test) { return Invoke-Swift @('test', '--filter', 'NucleicCarbonTests') $sql }
|
||||||
return Invoke-Swift @('build', '--target', 'NucleicCore') $sql.Lib
|
return Invoke-Swift @('build', '--target', 'NucleicCore') $sql
|
||||||
}
|
}
|
||||||
|
|
||||||
function Build-Broker {
|
function Build-Broker {
|
||||||
|
|||||||
Reference in New Issue
Block a user