diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-06-21 00:20:17 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-06-21 00:20:17 +0000 |
commit | 2a45fa7cf67bf88a4edf56d637f6ec7326e44ef8 (patch) | |
tree | 097811e2280a920a813ef82a33d543acd0e39f20 /lib/Driver/ToolChains.cpp | |
parent | c3b9014c7236a15cf467662264b243a22c420312 (diff) |
Driver/Darwin: Honor -Xarch_FOO when the arch matches either the toolchain or
the architecture being bound.
- Fixes things like -Xarch_armv7.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 53ef72295d..e9bea426ae 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -682,8 +682,13 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args, Arg *A = *it; if (A->getOption().matches(options::OPT_Xarch__)) { + // Skip this argument unless the architecture matches either the toolchain + // triple arch, or the arch being bound. + // // FIXME: Canonicalize name. - if (getArchName() != A->getValue(Args, 0)) + llvm::StringRef XarchArch = A->getValue(Args, 0); + if (!(XarchArch == getArchName() || + (BoundArch && XarchArch == BoundArch))) continue; Arg *OriginalArg = A; |