diff --git a/lld/MachO/Options.td b/lld/MachO/Options.td --- a/lld/MachO/Options.td +++ b/lld/MachO/Options.td @@ -701,6 +701,11 @@ def fatal_warnings : Flag<["-"], "fatal_warnings">, HelpText<"Treat warnings as errors">, Group; +def _fatal_warnings : Flag<["-"], "fatal-warnings">, + Alias, + HelpText<"Alias for -fatal_warnings to match other platforms">, + Flags<[HelpHidden]>, + Group; def no_eh_labels : Flag<["-"], "no_eh_labels">, HelpText<"In -r mode, suppress .eh labels in the __eh_frame section">, Flags<[HelpHidden]>, diff --git a/lld/test/MachO/fatal-warnings.s b/lld/test/MachO/fatal-warnings.s --- a/lld/test/MachO/fatal-warnings.s +++ b/lld/test/MachO/fatal-warnings.s @@ -3,8 +3,12 @@ # RUN: %no_fatal_warnings_lld %t1.o -o /dev/null -single_module 2>&1 \ # RUN: | FileCheck -check-prefix=WARNING %s +# RUN: %no_fatal_warnings_lld %t1.o -o /dev/null -fatal_warnings +# RUN: %no_fatal_warnings_lld %t1.o -o /dev/null -fatal-warnings # RUN: not %no_fatal_warnings_lld %t1.o -fatal_warnings -o /dev/null \ # RUN: -single_module 2>&1 | FileCheck -check-prefix=ERROR %s +# RUN: not %no_fatal_warnings_lld %t1.o -fatal-warnings -o /dev/null \ +# RUN: -single_module 2>&1 | FileCheck -check-prefix=ERROR %s # ERROR: error: Option `-single_module' is deprecated # WARNING: warning: Option `-single_module' is deprecated