summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test/generate_lld_tests.py8
-rw-r--r--scripts/test/lld.py12
2 files changed, 16 insertions, 4 deletions
diff --git a/scripts/test/generate_lld_tests.py b/scripts/test/generate_lld_tests.py
index 94c511ef4..00d5ae026 100755
--- a/scripts/test/generate_lld_tests.py
+++ b/scripts/test/generate_lld_tests.py
@@ -48,10 +48,10 @@ def generate_wat_files(llvm_bin, emscripten_root):
wasm_path = os.path.join(lld_path, wasm_file)
wat_path = os.path.join(lld_path, wat_file)
is_shared = 'shared' in src_file
+ is_64 = '64' in src_file
compile_cmd = [
os.path.join(llvm_bin, 'clang'), src_path, '-o', obj_path,
- '--target=wasm32-emscripten',
'-mllvm', '-enable-emscripten-sjlj',
'-c',
'-nostdinc',
@@ -81,6 +81,12 @@ def generate_wat_files(llvm_bin, emscripten_root):
else:
link_cmd.append('--entry=main')
+ if is_64:
+ compile_cmd.append('--target=wasm64-emscripten')
+ link_cmd.append('-mwasm64')
+ else:
+ compile_cmd.append('--target=wasm32-emscripten')
+
try:
support.run_command(compile_cmd)
support.run_command(link_cmd)
diff --git a/scripts/test/lld.py b/scripts/test/lld.py
index 328339287..1c632b957 100644
--- a/scripts/test/lld.py
+++ b/scripts/test/lld.py
@@ -49,7 +49,10 @@ def run_test(input_path):
else:
continue
- cmd = shared.WASM_EMSCRIPTEN_FINALIZE + [input_path, '-S'] + args
+ cmd = shared.WASM_EMSCRIPTEN_FINALIZE + args
+ if '64' in input_path:
+ cmd += ['--enable-memory64', '--bigint']
+ cmd += [input_path, '-S']
cmd += args_for_finalize(os.path.basename(input_path))
actual = support.run_command(cmd)
@@ -94,9 +97,12 @@ def update_lld_tests():
out_path = input_path + ext
if ext != '.out' and not os.path.exists(out_path):
continue
- cmd = shared.WASM_EMSCRIPTEN_FINALIZE + [input_path, '-S'] + \
- ext_args
+ cmd = shared.WASM_EMSCRIPTEN_FINALIZE + ext_args
+ if '64' in input_path:
+ cmd += ['--enable-memory64', '--bigint']
+ cmd += [input_path, '-S']
cmd += args_for_finalize(os.path.basename(input_path))
actual = support.run_command(cmd)
+
with open(out_path, 'w') as o:
o.write(actual)