diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-01-26 17:09:15 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-01-26 17:09:15 +0000 |
| commit | f3a06113c75348d884500b83a538e7dd82476051 (patch) | |
| tree | 68bf220b535e1cb4012c5c2addad1446b6dbb7c0 /clang/tools/ccc/ccclib/ToolChain.py | |
| parent | 179dd918b93b13c2eb7e9df1f05d4281c7b4250f (diff) | |
| download | bcm5719-llvm-f3a06113c75348d884500b83a538e7dd82476051.tar.gz bcm5719-llvm-f3a06113c75348d884500b83a538e7dd82476051.zip | |
ccc: Recognize -emit-llvm [-S].
- Unlike llvm-gcc, this doesn't yet treat -emit-llvm output as a
linker input.
llvm-svn: 63014
Diffstat (limited to 'clang/tools/ccc/ccclib/ToolChain.py')
| -rw-r--r-- | clang/tools/ccc/ccclib/ToolChain.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/clang/tools/ccc/ccclib/ToolChain.py b/clang/tools/ccc/ccclib/ToolChain.py index d0c1fe19f5f..564b6173fac 100644 --- a/clang/tools/ccc/ccclib/ToolChain.py +++ b/clang/tools/ccc/ccclib/ToolChain.py @@ -64,12 +64,14 @@ class Darwin_X86_ToolChain(ToolChain): self.archName = archName self.clangTool = Tools.Clang_CompileTool(self) + cc = Tools.Darwin_X86_CompileTool(self) self.toolMap = { Phases.PreprocessPhase : Tools.Darwin_X86_PreprocessTool(self), Phases.AnalyzePhase : self.clangTool, - Phases.SyntaxOnlyPhase : Tools.Darwin_X86_CompileTool(self), - Phases.CompilePhase : Tools.Darwin_X86_CompileTool(self), - Phases.PrecompilePhase : Tools.Darwin_X86_CompileTool(self), + Phases.SyntaxOnlyPhase : cc, + Phases.EmitLLVMPhase : cc, + Phases.CompilePhase : cc, + Phases.PrecompilePhase : cc, Phases.AssemblePhase : Tools.Darwin_AssembleTool(self), Phases.LinkPhase : Tools.Darwin_X86_LinkTool(self), Phases.LipoPhase : Tools.LipoTool(), @@ -110,7 +112,9 @@ class Darwin_X86_ToolChain(ToolChain): if self.driver.cccClang and self.archName == 'i386': if (action.inputs[0].type in (Types.CType, Types.CTypeNoPP, Types.ObjCType, Types.ObjCTypeNoPP) and - isinstance(action.phase, Phases.CompilePhase)): + (isinstance(action.phase, Phases.CompilePhase) or + isinstance(action.phase, Phases.SyntaxOnlyPhase) or + isinstance(action.phase, Phases.EmitLLVMPhase))): return self.clangTool elif (action.inputs[0].type in (Types.CHeaderType, Types.CHeaderNoPPType, Types.ObjCHeaderType, Types.ObjCHeaderNoPPType) and @@ -200,11 +204,13 @@ class Generic_GCC_ToolChain(ToolChain): def __init__(self, driver): super(Generic_GCC_ToolChain, self).__init__(driver) + cc = Tools.GCC_CompileTool() self.toolMap = { Phases.PreprocessPhase : Tools.GCC_PreprocessTool(), Phases.AnalyzePhase : Tools.Clang_CompileTool(self), - Phases.SyntaxOnlyPhase : Tools.GCC_CompileTool(), - Phases.CompilePhase : Tools.GCC_CompileTool(), + Phases.SyntaxOnlyPhase : cc, + Phases.EmitLLVMPhase : cc, + Phases.CompilePhase : cc, Phases.PrecompilePhase : Tools.GCC_PrecompileTool(), Phases.AssemblePhase : Tools.GCC_AssembleTool(), Phases.LinkPhase : Tools.GCC_LinkTool(), |

