Skip to content

Commit afd06cd

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

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

@@ -538,7 +542,7 @@ case "$cpu" in
538542
CPU_CFLAGS="-m32"
539543
;;
540544
wasm64)
541-
CPU_CFLAGS="-m64 -sMEMORY64=1"
545+
CPU_CFLAGS="-m64 -sMEMORY64=$wasm64_memory64"
542546
;;
543547
esac
544548

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

0 commit comments

Comments
 (0)