summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@midokura.com>2023-10-20 21:54:03 (GMT)
committerGitHub <noreply@github.com>2023-10-20 21:54:03 (GMT)
commit5dfa71769f547fffa893a89b0b04d963a41b2441 (patch)
tree312e205254e43e69dbe0e9ac402756dd12d4f8c1 /configure
parent0937b11b89a26626c51e3975f8c52522e99def26 (diff)
downloadcpython-5dfa71769f547fffa893a89b0b04d963a41b2441.zip
cpython-5dfa71769f547fffa893a89b0b04d963a41b2441.tar.gz
cpython-5dfa71769f547fffa893a89b0b04d963a41b2441.tar.bz2
gh-111046: for wasi-threads, export memory as well via the linker (GH-111099)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure b/configure
index c87f518..3bf92dd 100755
--- a/configure
+++ b/configure
@@ -9268,10 +9268,15 @@ then :
# without this, configure fails to find pthread_create, sem_init,
# etc because they are only available in the sysroot for
# wasm32-wasi-threads.
+ # Note: wasi-threads requires --import-memory.
+ # Note: wasi requires --export-memory.
+ # Note: --export-memory is implicit unless --import-memory is given
+ # Note: this requires LLVM >= 16.
as_fn_append CFLAGS " -target wasm32-wasi-threads -pthread"
as_fn_append CFLAGS_NODIST " -target wasm32-wasi-threads -pthread"
as_fn_append LDFLAGS_NODIST " -target wasm32-wasi-threads -pthread"
as_fn_append LDFLAGS_NODIST " -Wl,--import-memory"
+ as_fn_append LDFLAGS_NODIST " -Wl,--export-memory"
as_fn_append LDFLAGS_NODIST " -Wl,--max-memory=10485760"
fi