summaryrefslogtreecommitdiff
path: root/scripts/test/generate_lld_tests.py
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2020-12-14 14:18:16 -0800
committerGitHub <noreply@github.com>2020-12-14 14:18:16 -0800
commitb4928af5e70c85d309f7a074ed80bbcd1ee414f9 (patch)
treed78f645fdacb4f2c961c2ab689b442b1e131355f /scripts/test/generate_lld_tests.py
parentc1ab2b33f63d5e79143e05de4e8e9e0ddd970e77 (diff)
downloadbinaryen-b4928af5e70c85d309f7a074ed80bbcd1ee414f9.tar.gz
binaryen-b4928af5e70c85d309f7a074ed80bbcd1ee414f9.tar.bz2
binaryen-b4928af5e70c85d309f7a074ed80bbcd1ee414f9.zip
Fixed wasm-emscripten-finalize AsmConstWalker not handling 64-bit pointers (#3431)
Also improved the LLD test scripts to accomodate 64-bit tests.
Diffstat (limited to 'scripts/test/generate_lld_tests.py')
-rwxr-xr-xscripts/test/generate_lld_tests.py8
1 files changed, 7 insertions, 1 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)