Skip to content

Commit 856ce7e

Browse files
committed
Restore static linking of hacl*
1 parent b7e20c1 commit 856ce7e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

cpython-unix/build-cpython.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ cat Makefile.extra
5858

5959
pushd Python-${PYTHON_VERSION}
6060

61+
if [ -n PYTHON_MEETS_MINIMUM_VERSION_3_14 ]; then
62+
# CPython only allows HACL* to be statically linked on WASI by default, undo that
63+
# See https://github.com/python/cpython/pull/132438
64+
patch -p1 -i ${ROOT}/patch-static-hacl-3.14.patch
65+
fi
66+
6167
# configure doesn't support cross-compiling on Apple. Teach it.
6268
if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
6369
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/configure.ac b/configure.ac
2+
index a7b2f62579b..3703dbb1f96 100644
3+
--- a/configure.ac
4+
+++ b/configure.ac
5+
@@ -7959,7 +7959,7 @@ AC_SUBST([LIBHACL_BLAKE2_SIMD256_OBJS])
6+
# HACL*-based cryptographic primitives
7+
8+
AC_MSG_CHECKING([for HACL* library linking type])
9+
-if test "$ac_sys_system" = "WASI"; then
10+
+if true; then
11+
LIBHACL_LDEPS_LIBTYPE=STATIC
12+
AC_MSG_RESULT([static])
13+
else

0 commit comments

Comments
 (0)