aboutsummaryrefslogtreecommitdiff
path: root/tools/ccc/ccclib/Driver.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-13 20:33:09 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-13 20:33:09 +0000
commitf1a624fcd4772b5cdc77dfc35bc38676f18c0776 (patch)
tree45423e5648a90e7f3eb41b064ed65433aa217cc8 /tools/ccc/ccclib/Driver.py
parent8be2a67620b6be5f2c15dc44099e71b2c8e59ef7 (diff)
ccc: Handle limited forms of -ccc-host-triple for testing
compatibility with C++ rewrite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/ccc/ccclib/Driver.py')
-rw-r--r--tools/ccc/ccclib/Driver.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index e631f55c28..5c978e2638 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -156,6 +156,20 @@ class Driver(object):
self.cccHostSystem,argv = argv[0],argv[1:]
elif opt == 'host-release':
self.cccHostRelease,argv = argv[0],argv[1:]
+ elif opt == 'host-triple':
+ # This is a complete hack, but only exists for testing
+ # compatibility with the new driver. We will be six
+ # feet under soon enough.
+ triple,argv = argv[0],argv[1:]
+ self.cccHostMachine,_,self.cccHostSystem = triple.split('-', 2)
+ if self.cccHostSystem.startswith('darwin'):
+ self.cccHostSystem = 'darwin'
+ self.cccHostRelease = '10.5.0'
+ if self.cccHostMachine == 'x86_64':
+ self.cccHostMachine = 'i386'
+ self.cccHostBits = '64'
+ elif self.cccHostMachine == 'i386':
+ self.cccHostBits = '32'
else:
raise Arguments.InvalidArgumentsError("invalid option: %r" % fullOpt)