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
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index afc7cf5..983a52b 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -58,6 +58,12 @@
         
         return platform.system().lower()
 
+    def getHostReleaseName(self):
+        if self.cccHostRelease:
+            return self.cccHostRelease
+        
+        return platform.release()
+
     ###
 
     def run(self, argv):
@@ -74,7 +80,8 @@
 
         # 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 @@
                 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