From: Daniel Dunbar Date: Fri, 13 Mar 2009 20:33:09 +0000 (+0000) Subject: ccc: Handle limited forms of -ccc-host-triple for testing X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1a624fcd4772b5cdc77dfc35bc38676f18c0776;p=clang 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 --- 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)