summaryrefslogtreecommitdiff
path: root/scripts/test
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-08-02 15:41:06 -0700
committerGitHub <noreply@github.com>2022-08-02 15:41:06 -0700
commit3d3350d789d909445c8d8d03545c50bc0ae416ef (patch)
treeb044afd8490166160889b14f5bd6406a0708f606 /scripts/test
parentdeb40b7cd6d02adc14c09782b2211e2d68c612b1 (diff)
downloadbinaryen-3d3350d789d909445c8d8d03545c50bc0ae416ef.tar.gz
binaryen-3d3350d789d909445c8d8d03545c50bc0ae416ef.tar.bz2
binaryen-3d3350d789d909445c8d8d03545c50bc0ae416ef.zip
Re-run scripts/test/generate_lld_tests.py. NFC (#4861)
Diffstat (limited to 'scripts/test')
-rwxr-xr-xscripts/test/generate_lld_tests.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/test/generate_lld_tests.py b/scripts/test/generate_lld_tests.py
index 1867d1d7b..254d73349 100755
--- a/scripts/test/generate_lld_tests.py
+++ b/scripts/test/generate_lld_tests.py
@@ -30,7 +30,7 @@ def files_with_extensions(path, extensions):
yield file, ext
-def generate_wat_files(llvm_bin, emscripten_root):
+def generate_wat_files(llvm_bin, emscripten_sysroot):
print('\n[ building wat files from C sources... ]\n')
lld_path = os.path.join(shared.options.binaryen_test, 'lld')
@@ -57,13 +57,12 @@ def generate_wat_files(llvm_bin, emscripten_root):
'-nostdinc',
'-Xclang', '-nobuiltininc',
'-Xclang', '-nostdsysteminc',
- '-Xclang', '-I%s/system/include' % emscripten_root,
+ '-Xclang', '-I%s/include' % emscripten_sysroot,
'-O1',
]
link_cmd = [
os.path.join(llvm_bin, 'wasm-ld'), '-flavor', 'wasm',
- '-z', '-stack-size=1048576',
obj_path, '-o', wasm_path,
'--allow-undefined',
'--export', '__wasm_call_ctors',
@@ -81,7 +80,10 @@ def generate_wat_files(llvm_bin, emscripten_root):
link_cmd.append('-shared')
link_cmd.append('--experimental-pic')
else:
- link_cmd.append('--entry=main')
+ if 'reserved_func_ptr' in src_file:
+ link_cmd.append('--entry=__main_argc_argv')
+ else:
+ link_cmd.append('--entry=main')
if is_64:
compile_cmd.append('--target=wasm64-emscripten')