[cfe-commits] r66938 - /cfe/trunk/tools/ccc/ccclib/Driver.py

Daniel Dunbar daniel at zuster.org
Fri Mar 13 13:33:09 PDT 2009


Author: ddunbar
Date: Fri Mar 13 15:33:09 2009
New Revision: 66938

URL: http://llvm.org/viewvc/llvm-project?rev=66938&view=rev
Log:
ccc: Handle limited forms of -ccc-host-triple for testing
compatibility with C++ rewrite.

Modified:
    cfe/trunk/tools/ccc/ccclib/Driver.py

Modified: cfe/trunk/tools/ccc/ccclib/Driver.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Driver.py?rev=66938&r1=66937&r2=66938&view=diff

==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Driver.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Driver.py Fri Mar 13 15:33:09 2009
@@ -156,6 +156,20 @@
                 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)
 





More information about the cfe-commits mailing list