diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-01-09 22:21:24 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-01-09 22:21:24 +0000 |
| commit | 61f97e290a7a47aace03f7556b4d34874b26017e (patch) | |
| tree | 8cc3975d1b3010bad480eee67dcdfc4628afe9c6 /clang/tools/ccc/ccclib/HostInfo.py | |
| parent | 890d44eb7fb684b3d9104b0454e2b76a6c130fd3 (diff) | |
| download | bcm5719-llvm-61f97e290a7a47aace03f7556b4d34874b26017e.tar.gz bcm5719-llvm-61f97e290a7a47aace03f7556b4d34874b26017e.zip | |
ccc: Get host information via Driver methods.
llvm-svn: 62011
Diffstat (limited to 'clang/tools/ccc/ccclib/HostInfo.py')
| -rw-r--r-- | clang/tools/ccc/ccclib/HostInfo.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/tools/ccc/ccclib/HostInfo.py b/clang/tools/ccc/ccclib/HostInfo.py index ccfd32b1372..507ac69cd5c 100644 --- a/clang/tools/ccc/ccclib/HostInfo.py +++ b/clang/tools/ccc/ccclib/HostInfo.py @@ -34,7 +34,9 @@ class DarwinX86_64HostInfo(DarwinHostInfo): def getArchName(self): return 'x86_64' -def getDarwinHostInfo(machine, bits): +def getDarwinHostInfo(driver): + machine = driver.getHostMachine() + bits = driver.getHostBits() if machine == 'i386': if bits == '32': return DarwinX86HostInfo() @@ -46,7 +48,7 @@ def getDarwinHostInfo(machine, bits): if bits == '64': return DarwinPPC_64HostInfo() - raise RuntimeError,'Unrecognized Darwin-i386 platform: %r:%r' % (machine, bits) + raise RuntimeError,'Unrecognized Darwin platform: %r:%r' % (machine, bits) # Unknown @@ -57,7 +59,7 @@ class UnknownHostInfo(HostInfo): def useDriverDriver(self): return False -def getUnknownHostInfo(machine, bits): +def getUnknownHostInfo(driver): return UnknownHostInfo() #### @@ -67,10 +69,11 @@ kSystems = { 'unknown' : getUnknownHostInfo, } -def getHostInfo(driver, system, machine, bits): +def getHostInfo(driver): + system = driver.getHostSystemName() handler = kSystems.get(system) if handler: - return handler(machine, bits) + return handler(driver) driver.warning('Unknown host %r, using generic host information.' % system) return UnknownHostInfo() |

