diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 9191ccd2a66ac..9689f12fd0141 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1452,7 +1452,7 @@ def extract_api_ignores_EQ: CommaJoined<["--"], "extract-api-ignores=">, Visibility<[ClangOption, CC1Option]>, HelpText<"Comma separated list of files containing a new line separated list of API symbols to ignore when extracting API information.">, MarshallingInfoStringVector>; -def e : JoinedOrSeparate<["-"], "e">, Flags<[LinkerInput]>, Group; +def e : Separate<["-"], "e">, Flags<[LinkerInput]>, Group; def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group, Visibility<[ClangOption, CC1Option]>, HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">, diff --git a/clang/test/Driver/entry.s b/clang/test/Driver/entry.s new file mode 100644 index 0000000000000..60ab89704c354 --- /dev/null +++ b/clang/test/Driver/entry.s @@ -0,0 +1,5 @@ +/// To prevent mistaking -exxx as --entry=xxx, we allow -e xxx but reject -exxx. +/// GCC -export-dynamic is rejected as well. +// RUN: not %clang -### --target=x86_64-linux-gnu -export-dynamic %s 2>&1 | FileCheck %s + +// CHECK: error: unknown argument: '-export-dynamic'