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

Function parse_arguments

tools/cmdline.py:827–855  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

825
826@ToolchainProfiler.profile()
827def parse_arguments(args):
828 newargs = list(args)
829
830 # Scan and strip emscripten specific cmdline warning flags.
831 # This needs to run before other cmdline flags have been parsed, so that
832 # warnings are properly printed during arg parse.
833 newargs = diagnostics.capture_warnings(newargs)
834
835 if not diagnostics.is_enabled('deprecated'):
836 settings.WARN_DEPRECATED = 0
837
838 newargs = normalize_args(newargs)
839 newargs = parse_args(newargs)
840
841 if options.post_link or options.oformat == OFormat.BARE:
842 diagnostics.warning('experimental', '--oformat=bare/--post-link are experimental and subject to change.')
843
844 parse_s_args()
845
846 # STRICT is used when applying settings so it needs to be applied first before
847 # calling `apply_user_settings`.
848 strict_cmdline = user_settings.get('STRICT')
849 if strict_cmdline:
850 settings.STRICT = int(strict_cmdline)
851
852 # Apply -s args here (after optimization levels, so they can override them)
853 apply_user_settings()
854
855 return newargs

Callers

nothing calls this directly

Calls 7

normalize_argsFunction · 0.85
parse_s_argsFunction · 0.85
apply_user_settingsFunction · 0.85
capture_warningsMethod · 0.80
warningMethod · 0.80
parse_argsFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected