aboutsummaryrefslogtreecommitdiff
path: root/tools/ccc/ccclib/Driver.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-12 04:21:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-12 04:21:12 +0000
commit9c257c3922a4315c115aa4dea74efa2d164b3f5e (patch)
tree44e288b1fb5d6723cc054a4872d1f889854b2458 /tools/ccc/ccclib/Driver.py
parent2ec55bcb666ef18d0caf629e58a9b64071028e3a (diff)
ccc: Generalize Darwin/Link tool based on Darwin version.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/ccc/ccclib/Driver.py')
-rw-r--r--tools/ccc/ccclib/Driver.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index afc7cf5854..983a52bd18 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -58,6 +58,12 @@ class Driver(object):
return platform.system().lower()
+ def getHostReleaseName(self):
+ if self.cccHostRelease:
+ return self.cccHostRelease
+
+ return platform.release()
+
###
def run(self, argv):
@@ -74,7 +80,8 @@ class Driver(object):
# FIXME: How to handle override of host? ccc specific options?
# Abuse -b?
- self.cccHostBits = self.cccHostMachine = self.cccHostSystem = None
+ self.cccHostBits = self.cccHostMachine = None
+ self.cccHostSystem = self.cccHostRelease = None
while argv and argv[0].startswith('-ccc-'):
opt,argv = argv[0][5:],argv[1:]
@@ -88,6 +95,8 @@ class Driver(object):
self.cccHostMachine,argv = argv[0],argv[1:]
elif opt == 'host-system':
self.cccHostSystem,argv = argv[0],argv[1:]
+ elif opt == 'host-release':
+ self.cccHostRelease,argv = argv[0],argv[1:]
else:
raise ValueError,"Invalid ccc option: %r" % cccPrintOptions