Skip to content

Commit fb166b4

Browse files
committed
[Driver] Revert -mcpu=?/-mtune=? and make -mcpu=help/-mtune=help unnamed
Follow-up to D144914. -mcpu=help seems fine as a Clang extension not in GCC, because llc supports -mcpu=help. -mcpu=? is a bad choice as ? may be expanded by the shell.
1 parent a783015 commit fb166b4

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,10 +4345,8 @@ def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">,
43454345
HelpText<"Print supported cpu models for the given target (if target is not specified,"
43464346
" it will print the supported cpus for the default target)">,
43474347
MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>;
4348-
def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>;
4349-
def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>;
4350-
def mcpu_EQ_help : Flag<["-"], "mcpu=help">, Alias<print_supported_cpus>;
4351-
def mtune_EQ_help : Flag<["-"], "mtune=help">, Alias<print_supported_cpus>;
4348+
def : Flag<["-"], "mcpu=help">, Alias<print_supported_cpus>;
4349+
def : Flag<["-"], "mtune=help">, Alias<print_supported_cpus>;
43524350
def time : Flag<["-"], "time">,
43534351
HelpText<"Time individual commands">;
43544352
def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>,

clang/test/Driver/print-supported-cpus.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66
// RUN: %clang --target=x86_64-unknown-linux-gnu --print-supported-cpus 2>&1 | \
77
// RUN: FileCheck %s --check-prefix=CHECK-X86
88

9-
// Test -mcpu=? and -mtune=? alises.
10-
// RUN: %clang --target=x86_64-unknown-linux-gnu -mcpu=? 2>&1 | \
11-
// RUN: FileCheck %s --check-prefix=CHECK-X86
12-
13-
// RUN: %clang --target=x86_64-unknown-linux-gnu -mtune=? -fuse-ld=dummy 2>&1 | \
14-
// RUN: FileCheck %s --check-prefix=CHECK-X86
15-
169
// Test -mcpu=help and -mtune=help alises.
1710
// RUN: %clang --target=x86_64-unknown-linux-gnu -mcpu=help 2>&1 | \
1811
// RUN: FileCheck %s --check-prefix=CHECK-X86

0 commit comments

Comments
 (0)