зеркало из 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):
|
def getToolChainForArch(self, arch):
|
||||||
if arch in ('i386', 'x86_64'):
|
if arch in ('i386', 'x86_64'):
|
||||||
return ToolChain.Darwin_X86_ToolChain(self.driver,
|
return ToolChain.Darwin_X86_ToolChain(self.driver,
|
||||||
|
arch,
|
||||||
self.darwinVersion,
|
self.darwinVersion,
|
||||||
self.gccVersion,
|
self.gccVersion)
|
||||||
arch)
|
|
||||||
|
|
||||||
return ToolChain.Generic_GCC_ToolChain(self.driver)
|
return ToolChain.Generic_GCC_ToolChain(self.driver, '')
|
||||||
|
|
||||||
class DarwinPPCHostInfo(DarwinHostInfo):
|
class DarwinPPCHostInfo(DarwinHostInfo):
|
||||||
def getArchName(self, args):
|
def getArchName(self, args):
|
||||||
|
@ -92,14 +92,14 @@ def getDarwinHostInfo(driver):
|
||||||
# Unknown
|
# Unknown
|
||||||
|
|
||||||
class UnknownHostInfo(HostInfo):
|
class UnknownHostInfo(HostInfo):
|
||||||
def getArchName(self):
|
def getArchName(self, args):
|
||||||
raise RuntimeError,'getArchName() unsupported on unknown host.'
|
raise RuntimeError,'getArchName() unsupported on unknown host.'
|
||||||
|
|
||||||
def useDriverDriver(self):
|
def useDriverDriver(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def getToolChain(self):
|
def getToolChain(self):
|
||||||
return ToolChain.Generic_GCC_ToolChain(self.driver)
|
return ToolChain.Generic_GCC_ToolChain(self.driver, '')
|
||||||
|
|
||||||
def getUnknownHostInfo(driver):
|
def getUnknownHostInfo(driver):
|
||||||
return UnknownHostInfo(driver)
|
return UnknownHostInfo(driver)
|
||||||
|
|
|
@ -10,10 +10,11 @@ import Types
|
||||||
class ToolChain(object):
|
class ToolChain(object):
|
||||||
"""ToolChain - Provide mappings of Actions to Tools."""
|
"""ToolChain - Provide mappings of Actions to Tools."""
|
||||||
|
|
||||||
def __init__(self, driver,
|
def __init__(self, driver, archName,
|
||||||
filePathPrefixes=[],
|
filePathPrefixes=[],
|
||||||
programPathPrefixes=[]):
|
programPathPrefixes=[]):
|
||||||
self.driver = driver
|
self.driver = driver
|
||||||
|
self.archName = archName
|
||||||
self.filePathPrefixes = list(filePathPrefixes)
|
self.filePathPrefixes = list(filePathPrefixes)
|
||||||
self.programPathPrefixes = list(programPathPrefixes)
|
self.programPathPrefixes = list(programPathPrefixes)
|
||||||
|
|
||||||
|
@ -80,13 +81,12 @@ class ToolChain(object):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
class Darwin_X86_ToolChain(ToolChain):
|
class Darwin_X86_ToolChain(ToolChain):
|
||||||
def __init__(self, driver, darwinVersion, gccVersion, archName):
|
def __init__(self, driver, archName, darwinVersion, gccVersion):
|
||||||
super(Darwin_X86_ToolChain, self).__init__(driver)
|
super(Darwin_X86_ToolChain, self).__init__(driver, archName)
|
||||||
assert isinstance(darwinVersion, tuple) and len(darwinVersion) == 3
|
assert isinstance(darwinVersion, tuple) and len(darwinVersion) == 3
|
||||||
assert isinstance(gccVersion, tuple) and len(gccVersion) == 3
|
assert isinstance(gccVersion, tuple) and len(gccVersion) == 3
|
||||||
self.darwinVersion = darwinVersion
|
self.darwinVersion = darwinVersion
|
||||||
self.gccVersion = gccVersion
|
self.gccVersion = gccVersion
|
||||||
self.archName = archName
|
|
||||||
|
|
||||||
self.clangTool = Tools.Clang_CompileTool(self)
|
self.clangTool = Tools.Clang_CompileTool(self)
|
||||||
cc = Tools.Darwin_X86_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
|
perform all subcommands; this relies on gcc translating the
|
||||||
options appropriately."""
|
options appropriately."""
|
||||||
|
|
||||||
def __init__(self, driver):
|
def __init__(self, driver, archName):
|
||||||
super(Generic_GCC_ToolChain, self).__init__(driver)
|
super(Generic_GCC_ToolChain, self).__init__(driver, archName)
|
||||||
cc = Tools.GCC_CompileTool(self)
|
cc = Tools.GCC_CompileTool(self)
|
||||||
self.clangTool = Tools.Clang_CompileTool(self)
|
self.clangTool = Tools.Clang_CompileTool(self)
|
||||||
self.toolMap = {
|
self.toolMap = {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче