summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2015-10-27 18:04:42 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2015-10-27 18:04:42 +0000
commit3d5e5680e2a71cde57bd21abb307de52ca73d7c8 (patch)
tree182fd9e3606ecbd9101a957de1dd1d15703be4b9 /clang/lib/Driver/Tools.cpp
parent07eeb8001e0cc9705366ecc63f79ed5f2a5f51fc (diff)
downloadbcm5719-llvm-3d5e5680e2a71cde57bd21abb307de52ca73d7c8.tar.gz
bcm5719-llvm-3d5e5680e2a71cde57bd21abb307de52ca73d7c8.zip
[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 llvm-svn: 251430
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp42
1 files changed, 30 insertions, 12 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 4c23a2961ce..44609aa4bda 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -2386,6 +2386,36 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
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 CollectArgsForIntegratedAssembler(Compilation &C,
} 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;
OpenPOWER on IntegriCloud