diff --git a/lld/lib/Driver/WinLinkOptions.td b/lld/lib/Driver/WinLinkOptions.td index 8a074171fc93..7c5101f8c87b 100644 --- a/lld/lib/Driver/WinLinkOptions.td +++ b/lld/lib/Driver/WinLinkOptions.td @@ -62,7 +62,7 @@ defm dynamicbase : B<"dynamicbase", "Disable address space layout randomization">; def help : F<"help">; -def help_q : F<"?">, Alias; +def help_q : Flag<["/?", "-?"], "">, Alias; def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>; diff --git a/lld/test/pecoff/help.test b/lld/test/pecoff/help.test new file mode 100644 index 000000000000..f5e9c358f1a8 --- /dev/null +++ b/lld/test/pecoff/help.test @@ -0,0 +1,4 @@ +# RUN: not lld -flavor link /help | FileCheck %s +# RUN: not lld -flavor link '/?' | FileCheck %s + +CHECK: USAGE