OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 import functools | 6 import functools |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import shlex | 9 import shlex |
10 import sys | 10 import sys |
(...skipping 15 matching lines...) Expand all Loading... |
26 return memoizer | 26 return memoizer |
27 | 27 |
28 | 28 |
29 @memoize() | 29 @memoize() |
30 def IsWindows(): | 30 def IsWindows(): |
31 return sys.platform in ['win32', 'cygwin'] | 31 return sys.platform in ['win32', 'cygwin'] |
32 | 32 |
33 | 33 |
34 @memoize() | 34 @memoize() |
35 def IsLinux(): | 35 def IsLinux(): |
36 return sys.platform.startswith('linux') | 36 return sys.platform.startswith(('linux', 'freebsd')) |
37 | 37 |
38 | 38 |
39 @memoize() | 39 @memoize() |
40 def IsMac(): | 40 def IsMac(): |
41 return sys.platform == 'darwin' | 41 return sys.platform == 'darwin' |
42 | 42 |
43 | 43 |
44 @memoize() | 44 @memoize() |
45 def gyp_defines(): | 45 def gyp_defines(): |
46 """Parses and returns GYP_DEFINES env var as a dictionary.""" | 46 """Parses and returns GYP_DEFINES env var as a dictionary.""" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 elif platform() == 'ios': | 105 elif platform() == 'ios': |
106 return 'xcode' | 106 return 'xcode' |
107 elif IsWindows(): | 107 elif IsWindows(): |
108 return 'ninja' | 108 return 'ninja' |
109 elif IsLinux(): | 109 elif IsLinux(): |
110 return 'ninja' | 110 return 'ninja' |
111 elif IsMac(): | 111 elif IsMac(): |
112 return 'ninja' | 112 return 'ninja' |
113 else: | 113 else: |
114 assert False, 'Don\'t know what builder we\'re using!' | 114 assert False, 'Don\'t know what builder we\'re using!' |
OLD | NEW |