Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1207)

Unified Diff: pylib/gyp/common.py

Issue 10876082: Support for newer versions of Solaris and FreeBSD (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: addressed comments and uploaded test Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pylib/gyp/common_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/common.py
diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
index 6144d2fe7af90bd9690bb92bc234c0a825f2060a..6962684e10c8471c477278df06b19ad4e904de48 100644
--- a/pylib/gyp/common.py
+++ b/pylib/gyp/common.py
@@ -361,13 +361,18 @@ def GetFlavor(params):
'cygwin': 'win',
'win32': 'win',
'darwin': 'mac',
- 'sunos5': 'solaris',
- 'freebsd7': 'freebsd',
- 'freebsd8': 'freebsd',
- 'freebsd9': 'freebsd',
}
- flavor = flavors.get(sys.platform, 'linux')
- return params.get('flavor', flavor)
+
+ if 'flavor' in params:
+ return params['flavor']
+ if sys.platform in flavors:
+ return flavors[sys.platform]
+ if sys.platform.startswith('sunos'):
+ return 'solaris'
+ if sys.platform.startswith('freebsd'):
+ return 'freebsd'
+
+ return 'linux'
def CopyTool(flavor, out_path):
« no previous file with comments | « no previous file | pylib/gyp/common_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698