From 7e9095bcc5726bc71b155f0e219189c96c520729 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 28 Jul 2020 15:06:04 +0200 Subject: [PATCH] WASI: Put the stack before globals See https://github.com/ziglang/zig/issues/4496 --- dist-build/wasm32-wasi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist-build/wasm32-wasi.sh b/dist-build/wasm32-wasi.sh index cf6990fb..193e7686 100755 --- a/dist-build/wasm32-wasi.sh +++ b/dist-build/wasm32-wasi.sh @@ -21,7 +21,7 @@ mkdir -p $PREFIX || exit 1 export CC="clang" export CFLAGS="-DED25519_NONDETERMINISTIC=1 --target=wasm32-wasi --sysroot=${WASI_LIBC} -O2" -export LDFLAGS="-s -Wl,--no-threads" +export LDFLAGS="-s -Wl,--no-threads -Wl,--stack-first" export NM="llvm-nm" export AR="llvm-ar" export RANLIB="llvm-ranlib"