MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / compile_javascript

Function compile_javascript

tools/emscripten.py:212–222  ·  view source on GitHub ↗
(symbols_only=False)

Source from the content-addressed store, hash-verified

210
211@ToolchainProfiler.profile()
212def compile_javascript(symbols_only=False):
213 # Save settings to a file to work around v8 issue 1579
214 settings_json = json.dumps(settings.external_dict(), sort_keys=True, indent=2)
215 building.write_intermediate(settings_json, 'settings.json')
216
217 # Call js compiler. Passing `-` here mean read the settings from stdin.
218 args = ['-']
219 if symbols_only:
220 args += ['--symbols-only']
221 return shared.run_js_tool(path_from_root('tools/compiler.mjs'),
222 args, input=settings_json, stdout=subprocess.PIPE)
223
224
225def set_memory(static_bump):

Callers 1

Calls 2

path_from_rootFunction · 0.90
external_dictMethod · 0.80

Tested by

no test coverage detected