From d37afd6015fa246b967aa216611874883e5670c1 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 c6ae3ac7..96f08e10 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"