clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91671 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index d3c1b31..b1846b3 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -367,7 +367,7 @@
CmdArgs.push_back(ABIName);
// Set the CPU based on -march= and -mcpu=.
- CmdArgs.push_back("-mcpu");
+ CmdArgs.push_back("-target-cpu");
CmdArgs.push_back(getARMTargetCPU(Args));
// Select the float ABI as determined by -msoft-float, -mhard-float, and
@@ -480,7 +480,7 @@
}
if (CPUName) {
- CmdArgs.push_back("-mcpu");
+ CmdArgs.push_back("-target-cpu");
CmdArgs.push_back(CPUName);
}
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 4147057..07505bb 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -599,7 +599,7 @@
Res.push_back("-triple");
Res.push_back(Opts.Triple);
if (!Opts.CPU.empty()) {
- Res.push_back("-mcpu");
+ Res.push_back("-target-cpu");
Res.push_back(Opts.CPU);
}
if (!Opts.ABI.empty()) {
@@ -1252,7 +1252,7 @@
static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
using namespace cc1options;
Opts.ABI = getLastArgValue(Args, OPT_target_abi);
- Opts.CPU = getLastArgValue(Args, OPT_mcpu);
+ Opts.CPU = getLastArgValue(Args, OPT_target_cpu);
Opts.Triple = getLastArgValue(Args, OPT_triple);
Opts.Features = getAllArgValues(Args, OPT_target_feature);