diff options
author | Tarun Prabhu <tarun@lanl.gov> | 2024-11-22 11:57:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 11:57:03 -0700 |
commit | 23d7a6cedb5198535086a67586487f19effbd411 (patch) | |
tree | 4df2bdef2e40b0910beeffc7e8061d506fc78606 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 7530e707afc60014624eb62bda9557cdc7f28dd0 (diff) | |
download | llvm-23d7a6cedb5198535086a67586487f19effbd411.zip llvm-23d7a6cedb5198535086a67586487f19effbd411.tar.gz llvm-23d7a6cedb5198535086a67586487f19effbd411.tar.bz2 |
[flang][Driver] Support -print-supported-cpus and associated aliases (#117199)
The aliases are -mcpu=help and -mtune=help. There is still an issue with
the output which prints an example line that references clang. That is
not fixed here because it is printed in llvm/MC/SubtargetInfo.cpp. Some
more thought is needed to determine how best to handle this.
Fixes #117010
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 1214a2e..0b79c95 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -634,6 +634,8 @@ static bool parseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args, opts.outputFile = args.getLastArgValue(clang::driver::options::OPT_o); opts.showHelp = args.hasArg(clang::driver::options::OPT_help); opts.showVersion = args.hasArg(clang::driver::options::OPT_version); + opts.printSupportedCPUs = + args.hasArg(clang::driver::options::OPT_print_supported_cpus); // Get the input kind (from the value passed via `-x`) InputKind dashX(Language::Unknown); |