Merge nucleic/humble-fern-egret-60xo into dev

This commit is contained in:
2026-07-28 21:27:59 -07:00
parent a71bd73598
commit 7784c4e3f4
+6 -2
View File
@@ -16,7 +16,7 @@
CPATH — additive. clang appends it to the header search path without
disturbing MSVC/SDK auto-detection, so plain `swift build`
works afterwards with no flags at all.
-Xlinker -LIBPATH: — passed per-invocation rather than via %LIB%. Setting %LIB%
-Xlinker /LIBPATH: — passed per-invocation rather than via %LIB%. Setting %LIB%
would be actively harmful: clang skips emitting its own
-libpath: for the VC, UCRT *and* Windows SDK directories the
moment %LIB% is set (clang/lib/Driver/ToolChains/MSVC.cpp,
@@ -167,7 +167,11 @@ function Invoke-Swift([string[]]$SwiftArgs, [hashtable]$Sql) {
# warning. Read the warnings.
$full = @($SwiftArgs) + @(
'-Xcc', "-I$($Sql.Include)",
'-Xlinker', "-LIBPATH:$($Sql.Lib)",
# `/LIBPATH:`, NOT `-LIBPATH:`. A leading `-L` is claimed by the driver's GNU-style
# library-path flag, so `-LIBPATH:C:\…\lib` is read as `-L` + `IBPATH:C:\…\lib` and
# re-emitted to the linker as `-libpath:IBPATH:C:\…\lib` — a directory that exists
# nowhere, and the only symptom is `lld-link: could not open 'sqlite3.lib'`.
'-Xlinker', "/LIBPATH:$($Sql.Lib)",
'-Xlinker', '/FORCE:MULTIPLE')
Write-Note "swift $($full -join ' ')"
# Out-Host, not the pipeline: a native command's stdout would otherwise become this