зеркало из https://github.com/microsoft/clang-1.git
ccc: Store arch name in all toolchains.
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65102 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
da153239bb
Коммит
15423b066d
|
@ -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)
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче