aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-04-27 19:51:11 +0000
committerChad Rosier <mcrosier@apple.com>2012-04-27 19:51:11 +0000
commit8202fb8ee3c86797f737413de6030a88c8e0781c (patch)
treebf9fbd897736c8c45b2a9d211bff592df0fa6576 /lib/Driver/Driver.cpp
parenta1366cbab89ec6d4f630dca91e85d03d9e5d1d7d (diff)
[driver] Don't try to set the deployment target when there is no bound
architecture; this was happening for tools such as lipo and dsymutil. Also, if no -arch option has been specified, set the architecture based on the TC default. rdar://11329656 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 7874a48cde..44521a1a59 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -763,8 +763,7 @@ static unsigned PrintActions1(const Compilation &C, Action *A,
if (InputAction *IA = dyn_cast<InputAction>(A)) {
os << "\"" << IA->getInputArg().getValue(C.getArgs()) << "\"";
} else if (BindArchAction *BIA = dyn_cast<BindArchAction>(A)) {
- os << '"' << (BIA->getArchName() ? BIA->getArchName() :
- C.getDefaultToolChain().getArchName()) << '"'
+ os << '"' << BIA->getArchName() << '"'
<< ", {" << PrintActions1(C, *BIA->begin(), Ids) << "}";
} else {
os << "{";
@@ -838,7 +837,7 @@ void Driver::BuildUniversalActions(const ToolChain &TC,
// When there is no explicit arch for this platform, make sure we still bind
// the architecture (to the default) so that -Xarch_ is handled correctly.
if (!Archs.size())
- Archs.push_back(0);
+ Archs.push_back(Args.MakeArgString(TC.getArchName()));
// FIXME: We killed off some others but these aren't yet detected in a
// functional manner. If we added information to jobs about which "auxiliary"