diff --git a/tools/ccc/ccclib/HostInfo.py b/tools/ccc/ccclib/HostInfo.py index 7c94cbaf50..e95ffa1e44 100644 --- a/tools/ccc/ccclib/HostInfo.py +++ b/tools/ccc/ccclib/HostInfo.py @@ -43,11 +43,11 @@ class DarwinHostInfo(HostInfo): def getToolChainForArch(self, arch): if arch in ('i386', 'x86_64'): return ToolChain.Darwin_X86_ToolChain(self.driver, + arch, self.darwinVersion, - self.gccVersion, - arch) + self.gccVersion) - return ToolChain.Generic_GCC_ToolChain(self.driver) + return ToolChain.Generic_GCC_ToolChain(self.driver, '') class DarwinPPCHostInfo(DarwinHostInfo): def getArchName(self, args): @@ -92,14 +92,14 @@ def getDarwinHostInfo(driver): # Unknown class UnknownHostInfo(HostInfo): - def getArchName(self): + def getArchName(self, args): raise RuntimeError,'getArchName() unsupported on unknown host.' def useDriverDriver(self): return False def getToolChain(self): - return ToolChain.Generic_GCC_ToolChain(self.driver) + return ToolChain.Generic_GCC_ToolChain(self.driver, '') def getUnknownHostInfo(driver): return UnknownHostInfo(driver) diff --git a/tools/ccc/ccclib/ToolChain.py b/tools/ccc/ccclib/ToolChain.py index 62a380b013..2fe482ecd2 100644 --- a/tools/ccc/ccclib/ToolChain.py +++ b/tools/ccc/ccclib/ToolChain.py @@ -10,10 +10,11 @@ import Types class ToolChain(object): """ToolChain - Provide mappings of Actions to Tools.""" - def __init__(self, driver, + def __init__(self, driver, archName, filePathPrefixes=[], programPathPrefixes=[]): self.driver = driver + self.archName = archName self.filePathPrefixes = list(filePathPrefixes) self.programPathPrefixes = list(programPathPrefixes) @@ -80,13 +81,12 @@ class ToolChain(object): return True class Darwin_X86_ToolChain(ToolChain): - def __init__(self, driver, darwinVersion, gccVersion, archName): - super(Darwin_X86_ToolChain, self).__init__(driver) + def __init__(self, driver, archName, darwinVersion, gccVersion): + super(Darwin_X86_ToolChain, self).__init__(driver, archName) assert isinstance(darwinVersion, tuple) and len(darwinVersion) == 3 assert isinstance(gccVersion, tuple) and len(gccVersion) == 3 self.darwinVersion = darwinVersion self.gccVersion = gccVersion - self.archName = archName self.clangTool = Tools.Clang_CompileTool(self) cc = Tools.Darwin_X86_CompileTool(self) @@ -235,8 +235,8 @@ class Generic_GCC_ToolChain(ToolChain): perform all subcommands; this relies on gcc translating the options appropriately.""" - def __init__(self, driver): - super(Generic_GCC_ToolChain, self).__init__(driver) + def __init__(self, driver, archName): + super(Generic_GCC_ToolChain, self).__init__(driver, archName) cc = Tools.GCC_CompileTool(self) self.clangTool = Tools.Clang_CompileTool(self) self.toolMap = {