From a134dbba6686621924a75dc8645abe8ab2273f44 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 24 Jan 2020 14:04:12 -0800 Subject: Reland "Fix renaming in FixInvokeFunctionNamesWalker (#2513)" (#2622) This reverts commit 132daae1e9154782bb1afa5df80dfe7ea35f0369. This change is the same as before but the fix in #2619 should now make it safe. --- scripts/test/generate_lld_tests.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'scripts/test/generate_lld_tests.py') diff --git a/scripts/test/generate_lld_tests.py b/scripts/test/generate_lld_tests.py index 64fcff2ac..1f9324a88 100755 --- a/scripts/test/generate_lld_tests.py +++ b/scripts/test/generate_lld_tests.py @@ -30,8 +30,8 @@ def files_with_extensions(path, extensions): yield file, ext -def generate_wast_files(llvm_bin, emscripten_root): - print('\n[ building wast files from C sources... ]\n') +def generate_wat_files(llvm_bin, emscripten_root): + print('\n[ building wat files from C sources... ]\n') lld_path = os.path.join(shared.options.binaryen_test, 'lld') for src_file, ext in files_with_extensions(lld_path, ['.c', '.cpp']): @@ -42,11 +42,11 @@ def generate_wast_files(llvm_bin, emscripten_root): obj_path = os.path.join(lld_path, obj_file) wasm_file = src_file.replace(ext, '.wasm') - wast_file = src_file.replace(ext, '.wast') + wat_file = src_file.replace(ext, '.wat') obj_path = os.path.join(lld_path, obj_file) wasm_path = os.path.join(lld_path, wasm_file) - wast_path = os.path.join(lld_path, wast_file) + wat_path = os.path.join(lld_path, wat_file) is_shared = 'shared' in src_file compile_cmd = [ @@ -70,6 +70,10 @@ def generate_wast_files(llvm_bin, emscripten_root): '--export', '__data_end', '--global-base=568', ] + # We had a regression where this test only worked if debug names + # were included. + if 'longjmp' in src_file: + link_cmd.append('--strip-debug') if is_shared: compile_cmd.append('-fPIC') compile_cmd.append('-fvisibility=default') @@ -80,7 +84,7 @@ def generate_wast_files(llvm_bin, emscripten_root): try: support.run_command(compile_cmd) support.run_command(link_cmd) - support.run_command(shared.WASM_DIS + [wasm_path, '-o', wast_path]) + support.run_command(shared.WASM_DIS + [wasm_path, '-o', wat_path]) finally: # Don't need the .o or .wasm files, don't leave them around shared.delete_from_orbit(obj_path) @@ -91,4 +95,4 @@ if __name__ == '__main__': if len(shared.options.positional_args) != 2: print('Usage: generate_lld_tests.py [llvm/bin/dir] [path/to/emscripten]') sys.exit(1) - generate_wast_files(*shared.options.positional_args) + generate_wat_files(*shared.options.positional_args) -- cgit v1.2.3