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

Function get_closure_compiler

tools/building.py:490–502  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

488
489
490def get_closure_compiler():
491 # First check if the user configured a specific CLOSURE_COMPILER in their settings
492 if config.CLOSURE_COMPILER:
493 return config.CLOSURE_COMPILER
494
495 # Otherwise use the one installed via npm
496 cmd = shared.get_npm_cmd('google-closure-compiler')
497 if not WINDOWS:
498 # Work around an issue that Closure compiler can take up a lot of memory and crash in an error
499 # "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap
500 # out of memory"
501 cmd.insert(-1, '--max_old_space_size=8192')
502 return cmd
503
504
505def check_closure_compiler(cmd, args, env, allowed_to_fail):

Callers 1

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected