summaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-09-06 18:36:24 +0000
committerdim <dim@FreeBSD.org>2015-09-06 18:36:24 +0000
commit4238dc458ed9a048965af111b979fd51d288f22c (patch)
tree3d3ed1e1987dbe6444294b1b4e249814b97b97a5 /lib/Driver/ToolChain.cpp
parent6416b56f5a3923c6c264b46365e16718ccabf081 (diff)
downloadFreeBSD-src-4238dc458ed9a048965af111b979fd51d288f22c.zip
FreeBSD-src-4238dc458ed9a048965af111b979fd51d288f22c.tar.gz
Import clang 3.7.0 release (r246257).
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r--lib/Driver/ToolChain.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index e6a1bc9..d40bb95 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -305,12 +305,17 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args,
// Thumb2 is the default for V7 on Darwin.
//
// FIXME: Thumb should just be another -target-feaure, not in the triple.
+ StringRef MCPU, MArch;
+ if (const Arg *A = Args.getLastArg(options::OPT_mcpu_EQ))
+ MCPU = A->getValue();
+ if (const Arg *A = Args.getLastArg(options::OPT_march_EQ))
+ MArch = A->getValue();
std::string CPU = Triple.isOSBinFormatMachO()
- ? tools::arm::getARMCPUForMArch(Args, Triple)
- : tools::arm::getARMTargetCPU(Args, Triple);
+ ? tools::arm::getARMCPUForMArch(MArch, Triple)
+ : tools::arm::getARMTargetCPU(MCPU, MArch, Triple);
StringRef Suffix =
tools::arm::getLLVMArchSuffixForARM(CPU,
- tools::arm::getARMArch(Args, Triple));
+ tools::arm::getARMArch(MArch, Triple));
bool ThumbDefault = Suffix.startswith("v6m") || Suffix.startswith("v7m") ||
Suffix.startswith("v7em") ||
(Suffix.startswith("v7") && getTriple().isOSBinFormatMachO());
OpenPOWER on IntegriCloud