summaryrefslogtreecommitdiffstats
path: root/clang/tools/ccc/ccclib/ToolChain.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-20 01:48:01 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-20 01:48:01 +0000
commit63e03cbe8cf878c1c006734868ccf4937b273dda (patch)
tree1f973069bd9c515bab31da0b763659d344fee105 /clang/tools/ccc/ccclib/ToolChain.py
parentcaae716837fe4949e598593e7252d541656edfe2 (diff)
downloadbcm5719-llvm-63e03cbe8cf878c1c006734868ccf4937b273dda.tar.gz
bcm5719-llvm-63e03cbe8cf878c1c006734868ccf4937b273dda.zip
ccc: Use toolChain arch name instead of looking for arch command line
argument; the toolchain should always know the arch. - Fixes: <rdar://problem/6582911> -ccc-clang-archs doesn't work for excluding ppc llvm-svn: 65104
Diffstat (limited to 'clang/tools/ccc/ccclib/ToolChain.py')
-rw-r--r--clang/tools/ccc/ccclib/ToolChain.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/clang/tools/ccc/ccclib/ToolChain.py b/clang/tools/ccc/ccclib/ToolChain.py
index 2fe482ecd24..aa1646a5b51 100644
--- a/clang/tools/ccc/ccclib/ToolChain.py
+++ b/clang/tools/ccc/ccclib/ToolChain.py
@@ -74,6 +74,12 @@ class ToolChain(object):
if self.driver.cccNoClangCXX:
if action.inputs[0].type in Types.cxxTypesSet:
return False
+
+ # Don't use clang if this isn't one of the user specified
+ # archs to build.
+ if (self.driver.cccClangArchs and
+ self.archName not in self.driver.cccClangArchs):
+ return False
return True
@@ -131,18 +137,6 @@ class Darwin_X86_ToolChain(ToolChain):
major,minor,minorminor = self.darwinVersion
return '%d.%d.%d' % (10, major-4, minor)
- def shouldUseClangCompiler(self, action):
- if not super(Darwin_X86_ToolChain, self).shouldUseClangCompiler(action):
- return False
-
- # Only use clang if user didn't override archs, or this is one
- # of the ones they provided.
- if (not self.driver.cccClangArchs or
- self.archName in self.driver.cccClangArchs):
- return True
-
- return False
-
def selectTool(self, action):
assert isinstance(action, Phases.JobAction)
OpenPOWER on IntegriCloud