[cfe-commits] r155730 - in /cfe/trunk: lib/Driver/Driver.cpp lib/Driver/ToolChains.cpp test/Driver/altivec.cpp
Chad Rosier
mcrosier at apple.com
Fri Apr 27 12:51:11 PDT 2012
Author: mcrosier
Date: Fri Apr 27 14:51:11 2012
New Revision: 155730
URL: http://llvm.org/viewvc/llvm-project?rev=155730&view=rev
Log:
[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
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/test/Driver/altivec.cpp
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=155730&r1=155729&r2=155730&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Apr 27 14:51:11 2012
@@ -763,8 +763,7 @@
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 @@
// 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"
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=155730&r1=155729&r2=155730&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Apr 27 14:51:11 2012
@@ -956,7 +956,8 @@
// Add an explicit version min argument for the deployment target. We do this
// after argument translation because -Xarch_ arguments may add a version min
// argument.
- AddDeploymentTarget(*DAL);
+ if (BoundArch)
+ AddDeploymentTarget(*DAL);
// Validate the C++ standard library choice.
CXXStdlibType Type = GetCXXStdlibType(*DAL);
Modified: cfe/trunk/test/Driver/altivec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/altivec.cpp?rev=155730&r1=155729&r2=155730&view=diff
==============================================================================
--- cfe/trunk/test/Driver/altivec.cpp (original)
+++ cfe/trunk/test/Driver/altivec.cpp Fri Apr 27 14:51:11 2012
@@ -1,6 +1,6 @@
// Check that we error when -faltivec is specified on non-ppc platforms.
-// RUN: %clang -ccc-clang-archs powerpc -target powerpc-apple-darwin -faltivec -fsyntax-only %s
+// RUN: %clang -ccc-clang-archs powerpc -target powerpc-unk-unk -faltivec -fsyntax-only %s
// RUN: %clang -ccc-clang-archs powerpc64 -target powerpc64-linux-gnu -faltivec -fsyntax-only %s
// RUN: %clang -target i386-pc-win32 -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
More information about the cfe-commits
mailing list