@@ -61,8 +61,7 @@ def access_quote(prop):
6161 return '.' + prop
6262
6363
64- def emscript_fastcomp (infile , outfile , memfile , compiler_engine ,
65- temp_files , DEBUG ):
64+ def emscript_fastcomp (infile , outfile , memfile , temp_files , DEBUG ):
6665 """Runs the emscripten LLVM-to-JS compiler.
6766
6867 Args:
@@ -92,7 +91,7 @@ def emscript_fastcomp(infile, outfile, memfile, compiler_engine,
9291 fixup_metadata_tables (metadata )
9392 funcs = fixup_functions (funcs , metadata )
9493 with ToolchainProfiler .profile_block ('compiler_glue' ):
95- glue , forwarded_data = compiler_glue (metadata , compiler_engine , temp_files , DEBUG )
94+ glue , forwarded_data = compiler_glue (metadata , temp_files , DEBUG )
9695
9796 with ToolchainProfiler .profile_block ('function_tables_and_exports' ):
9897 (post , function_table_data , bundled_args ) = (
@@ -229,7 +228,7 @@ def fix_dot_zero(m):
229228 return funcs
230229
231230
232- def compiler_glue (metadata , compiler_engine , temp_files , DEBUG ):
231+ def compiler_glue (metadata , temp_files , DEBUG ):
233232 if DEBUG :
234233 logger .debug ('emscript: js compiler glue' )
235234 t = time .time ()
@@ -242,7 +241,7 @@ def compiler_glue(metadata, compiler_engine, temp_files, DEBUG):
242241 assert not (metadata ['simd' ] and shared .Settings .WASM ), 'SIMD is used, but not supported in WASM mode yet'
243242 assert not (shared .Settings .SIMD and shared .Settings .WASM ), 'SIMD is requested, but not supported in WASM mode yet'
244243
245- glue , forwarded_data = compile_settings (compiler_engine , temp_files )
244+ glue , forwarded_data = compile_settings (temp_files )
246245
247246 if DEBUG :
248247 logger .debug (' emscript: glue took %s seconds' % (time .time () - t ))
@@ -760,7 +759,7 @@ def apply_forwarded_data(forwarded_data):
760759 StaticCodeHooks .atexits = str (forwarded_json ['ATEXITS' ])
761760
762761
763- def compile_settings (compiler_engine , temp_files ):
762+ def compile_settings (temp_files ):
764763 # Save settings to a file to work around v8 issue 1579
765764 with temp_files .get_file ('.txt' ) as settings_file :
766765 with open (settings_file , 'w' ) as s :
@@ -769,7 +768,7 @@ def compile_settings(compiler_engine, temp_files):
769768 # Call js compiler
770769 env = os .environ .copy ()
771770 env ['EMCC_BUILD_DIR' ] = os .getcwd ()
772- out = jsrun .run_js_tool (path_from_root ('src' , 'compiler.js' ), compiler_engine ,
771+ out = jsrun .run_js_tool (path_from_root ('src' , 'compiler.js' ), shared . NODE_JS ,
773772 [settings_file ], stdout = subprocess .PIPE , stderr = STDERR_FILE ,
774773 cwd = path_from_root ('src' ), env = env )
775774 assert '//FORWARDED_DATA:' in out , 'Did not receive forwarded data in pre output - process failed?'
@@ -2187,8 +2186,7 @@ def coerce(self, expression):
21872186]
21882187
21892188
2190- def emscript_wasm_backend (infile , outfile , memfile , compiler_engine ,
2191- temp_files , DEBUG ):
2189+ def emscript_wasm_backend (infile , outfile , memfile , temp_files , DEBUG ):
21922190 # Overview:
21932191 # * Run wasm-emscripten-finalize to extract metadata and modify the binary
21942192 # to use emscripten's wasm<->JS ABI
@@ -2206,7 +2204,7 @@ def emscript_wasm_backend(infile, outfile, memfile, compiler_engine,
22062204
22072205 if DEBUG :
22082206 t = time .time ()
2209- glue , forwarded_data = compile_settings (compiler_engine , temp_files )
2207+ glue , forwarded_data = compile_settings (temp_files )
22102208 if DEBUG :
22112209 logger .debug (' emscript: glue took %s seconds' % (time .time () - t ))
22122210 t = time .time ()
@@ -2791,5 +2789,5 @@ def generate_struct_info():
27912789
27922790 emscripter = emscript_wasm_backend if shared .Settings .WASM_BACKEND else emscript_fastcomp
27932791 return temp_files .run_and_clean (lambda : emscripter (
2794- infile , outfile_obj , memfile , shared . NODE_JS , temp_files , shared .DEBUG )
2792+ infile , outfile_obj , memfile , temp_files , shared .DEBUG )
27952793 )
0 commit comments