@@ -30,8 +30,8 @@ def files_with_extensions(path, extensions):
3030 yield file , ext
3131
3232
33- def generate_wat_files (llvm_bin , emscripten_root ):
34- print ('\n [ building wat files from C sources... ]\n ' )
33+ def generate_wast_files (llvm_bin , emscripten_root ):
34+ print ('\n [ building wast files from C sources... ]\n ' )
3535
3636 lld_path = os .path .join (shared .options .binaryen_test , 'lld' )
3737 for src_file , ext in files_with_extensions (lld_path , ['.c' , '.cpp' ]):
@@ -42,11 +42,11 @@ def generate_wat_files(llvm_bin, emscripten_root):
4242 obj_path = os .path .join (lld_path , obj_file )
4343
4444 wasm_file = src_file .replace (ext , '.wasm' )
45- wat_file = src_file .replace (ext , '.wat ' )
45+ wast_file = src_file .replace (ext , '.wast ' )
4646
4747 obj_path = os .path .join (lld_path , obj_file )
4848 wasm_path = os .path .join (lld_path , wasm_file )
49- wat_path = os .path .join (lld_path , wat_file )
49+ wast_path = os .path .join (lld_path , wast_file )
5050 is_shared = 'shared' in src_file
5151
5252 compile_cmd = [
@@ -70,10 +70,6 @@ def generate_wat_files(llvm_bin, emscripten_root):
7070 '--export' , '__data_end' ,
7171 '--global-base=568' ,
7272 ]
73- # We had a regression where this test only worked if debug names
74- # were included.
75- if 'shared_longjmp' in src_file :
76- link_cmd .append ('--strip-debug' )
7773 if is_shared :
7874 compile_cmd .append ('-fPIC' )
7975 compile_cmd .append ('-fvisibility=default' )
@@ -84,7 +80,7 @@ def generate_wat_files(llvm_bin, emscripten_root):
8480 try :
8581 support .run_command (compile_cmd )
8682 support .run_command (link_cmd )
87- support .run_command (shared .WASM_DIS + [wasm_path , '-o' , wat_path ])
83+ support .run_command (shared .WASM_DIS + [wasm_path , '-o' , wast_path ])
8884 finally :
8985 # Don't need the .o or .wasm files, don't leave them around
9086 shared .delete_from_orbit (obj_path )
@@ -95,4 +91,4 @@ def generate_wat_files(llvm_bin, emscripten_root):
9591 if len (shared .options .positional_args ) != 2 :
9692 print ('Usage: generate_lld_tests.py [llvm/bin/dir] [path/to/emscripten]' )
9793 sys .exit (1 )
98- generate_wat_files (* shared .options .positional_args )
94+ generate_wast_files (* shared .options .positional_args )
0 commit comments