[Clang][Driver] Add -mcpu=help and -mtune=help to clang
authorMichael Maitland <michaeltmaitland@gmail.com>
Mon, 27 Feb 2023 21:54:06 +0000 (13:54 -0800)
committerMichael Maitland <michaeltmaitland@gmail.com>
Tue, 28 Feb 2023 18:45:35 +0000 (10:45 -0800)
commit003078b62d8d40fc000462a97c3b70e01cbe4458
tree830c563260136549725647aaba71aa505102ff4c
parent2ae39902506f38d6368a7dbe3d64109f57ad6f99
[Clang][Driver] Add -mcpu=help and -mtune=help to clang

Clang currently uses `-mcpu=?` and `-mtune=?`. The `?` causes errors on some
shells such as zsh since it is a special character. In order for it to work on
shells such as zsh, the option must be passed in quotes or escaped. This patch
adds `-mcpu=help` and `-mtune=help` as another alias for `--print-supported-cpus`.
In llc, `-mcpu=help` is an alias to print supported cpus.

Differential Revision: https://reviews.llvm.org/D144914
clang/docs/CommandGuide/clang.rst
clang/include/clang/Driver/Options.td
clang/test/Driver/print-supported-cpus.c