]> granicus.if.org Git - clang/commitdiff
ccc: Handle limited forms of -ccc-host-triple for testing
authorDaniel Dunbar <daniel@zuster.org>
Fri, 13 Mar 2009 20:33:09 +0000 (20:33 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 13 Mar 2009 20:33:09 +0000 (20:33 +0000)
compatibility with C++ rewrite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66938 91177308-0d34-0410-b5e6-96231b3b80d8

tools/ccc/ccclib/Driver.py

index e631f55c28a6409354b3d060a9cfb48f1bf2fa5a..5c978e26383617342ba73e7a3a50115513c235c1 100644 (file)
@@ -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)