gh-146264: Use static HACL deps for static module builds (GH-146265)

This commit is contained in:
Ihar Hrachyshka 2026-04-11 17:31:10 -04:00 committed by GitHub
parent afbe1373ac
commit f445d2e866
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,3 @@
Fix static module builds on non-WASI targets by linking HACL dependencies as
static libraries when ``MODULE_BUILDTYPE=static``, preventing duplicate
``_Py_LibHacl_*`` symbol errors at link time.

2
configure generated vendored
View file

@ -33089,7 +33089,7 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HACL* library linking type" >&5
printf %s "checking for HACL* library linking type... " >&6; }
if test "$ac_sys_system" = "WASI"; then
if test "$ac_sys_system" = "WASI" || test "$MODULE_BUILDTYPE" = "static"; then
LIBHACL_LDEPS_LIBTYPE=STATIC
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static" >&5
printf "%s\n" "static" >&6; }

View file

@ -8217,7 +8217,7 @@ AC_SUBST([LIBHACL_BLAKE2_SIMD256_OBJS])
# HACL*-based cryptographic primitives
AC_MSG_CHECKING([for HACL* library linking type])
if test "$ac_sys_system" = "WASI"; then
if test "$ac_sys_system" = "WASI" || test "$MODULE_BUILDTYPE" = "static"; then
LIBHACL_LDEPS_LIBTYPE=STATIC
AC_MSG_RESULT([static])
else