()
| 634 | |
| 635 | |
| 636 | def check_settings(): |
| 637 | for s, reason in DEPRECATED_SETTINGS.items(): |
| 638 | if s in user_settings: |
| 639 | if s == 'MEMORY64' and user_settings[s] == '2': |
| 640 | # Don't warn about -sMEMORY64=2 (since its the only way to enable the lowering pass) |
| 641 | continue |
| 642 | diagnostics.warning('deprecated', f'{s} is deprecated ({reason}). Please open a bug if you have a continuing need for this setting') |
| 643 | |
| 644 | for name, msg in EXPERIMENTAL_SETTINGS.items(): |
| 645 | if getattr(settings, name): |
| 646 | diagnostics.warning('experimental', msg) |
| 647 | |
| 648 | for a, b, reason in INCOMPATIBLE_SETTINGS: |
| 649 | invert_b = b.startswith('NO_') |
| 650 | if invert_b: |
| 651 | b = b[3:] |
| 652 | |
| 653 | b_val = getattr(settings, b) |
| 654 | if invert_b: |
| 655 | b_val = not b_val |
| 656 | |
| 657 | if getattr(settings, a) and b_val: |
| 658 | msg = f'{a} is not compatible with {b}' |
| 659 | if invert_b: |
| 660 | msg += '=0' |
| 661 | if reason: |
| 662 | msg += f' ({reason})' |
| 663 | exit_with_error(msg) |
| 664 | |
| 665 | |
| 666 | @ToolchainProfiler.profile() |
no test coverage detected