aboutsummaryrefslogtreecommitdiff
path: root/tools/ccc/ccclib/Tools.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-11 23:07:54 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-11 23:07:54 +0000
commit105e9d75d99b3b62a6f75ff29a0e2b821e4dad68 (patch)
tree5a635f1222b70110b248638595f2aa6d50156d17 /tools/ccc/ccclib/Tools.py
parent5f8d1dbcd0c4368c70b8528252d093aa69f11879 (diff)
ccc: -x assembler-with-cpp was broken for darwin, and it wasn't using
clang as the preprocessor even when it should. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/ccc/ccclib/Tools.py')
-rw-r--r--tools/ccc/ccclib/Tools.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index 53fe38df21..f4b8683837 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -193,7 +193,13 @@ class Clang_CompileTool(Tool):
elif outputType is Types.LLVMBCType:
cmd_args.append('-emit-llvm-bc')
elif outputType is Types.AsmTypeNoPP:
- cmd_args.append('-S')
+ # FIXME: This is hackish, it would be better if we had the
+ # action instead of just looking at types.
+ assert len(inputs) == 1
+ if inputs[0].type is Types.AsmType:
+ cmd_args.append('-E')
+ else:
+ cmd_args.append('-S')
elif (inputs[0].type.preprocess and
outputType is inputs[0].type.preprocess):
cmd_args.append('-E')
@@ -453,7 +459,9 @@ class Darwin_X86_CC1Tool(Tool):
"""getCC1Name(type) -> name, use-cpp, is-cxx"""
# FIXME: Get bool results from elsewhere.
- if type is Types.CType or type is Types.CHeaderType:
+ if type is Types.AsmType:
+ return 'cc1',True,False
+ elif type is Types.CType or type is Types.CHeaderType:
return 'cc1',True,False
elif type is Types.CTypeNoPP or type is Types.CHeaderNoPPType:
return 'cc1',False,False