(args)
| 825 | |
| 826 | @ToolchainProfiler.profile() |
| 827 | def 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 |
nothing calls this directly
no test coverage detected