Skip to content

Commit c10e4d8

Browse files
committed
wasm64: Enable to propagate -sMEMORY64 flag to Emscripten
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
1 parent 7e5790c commit c10e4d8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

configure

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ EXTRA_CXXFLAGS=""
182182
EXTRA_OBJCFLAGS=""
183183
EXTRA_LDFLAGS=""
184184

185+
wasm64_memory64=1
186+
185187
# Default value for a variable defining feature "foo".
186188
# * foo="no" feature will only be used if --enable-foo arg is given
187189
# * foo="" feature will be searched for, and if found, will be used
@@ -239,6 +241,8 @@ for opt do
239241
;;
240242
--without-default-features) default_feature="no"
241243
;;
244+
--wasm64-memory64=*) wasm64_memory64="$optarg"
245+
;;
242246
esac
243247
done
244248

@@ -537,7 +541,7 @@ case "$cpu" in
537541
CPU_CFLAGS="-m32"
538542
;;
539543
wasm64)
540-
CPU_CFLAGS="-m64 -sMEMORY64=1"
544+
CPU_CFLAGS="-m64 -sMEMORY64=$wasm64_memory64"
541545
;;
542546
esac
543547

@@ -795,6 +799,8 @@ for opt do
795799
;;
796800
--disable-rust) rust=disabled
797801
;;
802+
--wasm64-memory64=*)
803+
;;
798804
# everything else has the same name in configure and meson
799805
--*) meson_option_parse "$opt" "$optarg"
800806
;;
@@ -920,6 +926,8 @@ Advanced options (experts only):
920926
--disable-containers don't use containers for cross-building
921927
--container-engine=TYPE which container engine to use [$container_engine]
922928
--gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
929+
--wasm64-memory64 Used only for wasm64 build. Set -sMEMORY64 of
930+
Emscripten to 1(default) or 2 (choices: 1/2)
923931
EOF
924932
meson_options_help
925933
cat << EOF

0 commit comments

Comments
 (0)