Make the --out-implib support ([6092b0b86bf93a3d]) specifically opt-in because the feature check for it passes on some platforms where it is not recognized at link-time.

FossilOrigin-Name: 75535f2355b3b2e83dd57f4c30340af98c8dbcfe6ff1e9be17d23bd30d7d766c
This commit is contained in:
stephan
2025-02-11 13:13:46 +00:00
parent df9b89932f
commit 62e1d44846
5 changed files with 32 additions and 17 deletions
+13 -6
View File
@@ -965,16 +965,23 @@ proc sqlite-check-mac-cversion {} {
# used for building an "import library .dll.a" file on some platforms
# (e.g. mingw). Returns 1 if supported, else 0.
#
# If the configure flag --out-implib is not used then this is a no-op.
# The feature is specifically opt-in because on some platforms the
# feature test will pass but using that flag will fail at link-time
# (e.g. OpenBSD).
#
# Added in response to: https://sqlite.org/forum/forumpost/0c7fc097b2
proc sqlite-check-out-implib {} {
define LDFLAGS_OUT_IMPLIB ""
set rc 0
cc-with {} {
set dll "libsqlite3[get-define TARGET_DLLEXT]"
set flags "-Wl,--out-implib,${dll}.a"
if {[cc-check-flags $flags]} {
define LDFLAGS_OUT_IMPLIB $flags
set rc 1
if {[proj-opt-was-provided out-implib]} {
cc-with {} {
set dll "libsqlite3[get-define TARGET_DLLEXT]"
set flags "-Wl,--out-implib,${dll}.a"
if {[cc-check-flags $flags]} {
define LDFLAGS_OUT_IMPLIB $flags
set rc 1
}
}
}
return $rc