r251430 - [mips] Separated mips specific -Wa options, so that they are not checked on other platforms.
Daniel Sanders via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 11:04:42 PDT 2015
Author: dsanders
Date: Tue Oct 27 13:04:42 2015
New Revision: 251430
URL: http://llvm.org/viewvc/llvm-project?rev=251430&view=rev
Log:
[mips] Separated mips specific -Wa options, so that they are not checked on other platforms.
Summary: This is a follow on to post review comments on revision r248276.
Patch by Scott Egerton.
Reviewers: vkalintiris, dsanders
Subscribers: joerg, rengolin, cfe-commits
Differential Revision: http://reviews.llvm.org/D13100
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=251430&r1=251429&r2=251430&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Oct 27 13:04:42 2015
@@ -2386,6 +2386,36 @@ static void CollectArgsForIntegratedAsse
continue;
}
+ switch (C.getDefaultToolChain().getArch()) {
+ default:
+ break;
+ case llvm::Triple::mips:
+ case llvm::Triple::mipsel:
+ case llvm::Triple::mips64:
+ case llvm::Triple::mips64el:
+ if (Value == "--trap") {
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("+use-tcc-in-div");
+ continue;
+ }
+ if (Value == "--break") {
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("-use-tcc-in-div");
+ continue;
+ }
+ if (Value.startswith("-msoft-float")) {
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("+soft-float");
+ continue;
+ }
+ if (Value.startswith("-mhard-float")) {
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("-soft-float");
+ continue;
+ }
+ break;
+ }
+
if (Value == "-force_cpusubtype_ALL") {
// Do nothing, this is the default and we don't support anything else.
} else if (Value == "-L") {
@@ -2418,18 +2448,6 @@ static void CollectArgsForIntegratedAsse
} else if (Value.startswith("-mcpu") || Value.startswith("-mfpu") ||
Value.startswith("-mhwdiv") || Value.startswith("-march")) {
// Do nothing, we'll validate it later.
- } else if (Value == "--trap") {
- CmdArgs.push_back("-target-feature");
- CmdArgs.push_back("+use-tcc-in-div");
- } else if (Value == "--break") {
- CmdArgs.push_back("-target-feature");
- CmdArgs.push_back("-use-tcc-in-div");
- } else if (Value.startswith("-msoft-float")) {
- CmdArgs.push_back("-target-feature");
- CmdArgs.push_back("+soft-float");
- } else if (Value.startswith("-mhard-float")) {
- CmdArgs.push_back("-target-feature");
- CmdArgs.push_back("-soft-float");
} else {
D.Diag(diag::err_drv_unsupported_option_argument)
<< A->getOption().getName() << Value;
More information about the cfe-commits
mailing list