OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script is wrapper for Chromium that adds some support for how GYP | 7 # This script is wrapper for Chromium that adds some support for how GYP |
8 # is invoked by Chromium beyond what can be done in the gclient hooks. | 8 # is invoked by Chromium beyond what can be done in the gclient hooks. |
9 | 9 |
10 import glob | 10 import glob |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 # release_extra_flags=... http://crbug.com/330305 | 170 # release_extra_flags=... http://crbug.com/330305 |
171 | 171 |
172 # These tuples of (key, value, gn_arg_string) use the gn_arg_string for | 172 # These tuples of (key, value, gn_arg_string) use the gn_arg_string for |
173 # gn when the key is set to the given value in the GYP arguments. | 173 # gn when the key is set to the given value in the GYP arguments. |
174 remap_cases = [ | 174 remap_cases = [ |
175 ('android_webview_build', '1', 'is_android_webview_build=true'), | 175 ('android_webview_build', '1', 'is_android_webview_build=true'), |
176 ('branding', 'Chrome', 'is_chrome_branded=true'), | 176 ('branding', 'Chrome', 'is_chrome_branded=true'), |
177 ('buildtype', 'Official', 'is_official_build=true'), | 177 ('buildtype', 'Official', 'is_official_build=true'), |
178 ('component', 'shared_library', 'is_component_build=true'), | 178 ('component', 'shared_library', 'is_component_build=true'), |
179 ('clang', '1', 'is_clang=true'), | 179 ('clang', '1', 'is_clang=true'), |
| 180 ('disable_glibcxx_debug', '1', 'disable_glibcxx_debug=true'), |
180 ('target_arch', 'ia32', 'cpu_arch="x86"'), | 181 ('target_arch', 'ia32', 'cpu_arch="x86"'), |
181 ('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'), | 182 ('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'), |
182 ('target_arch', 'arm', 'cpu_arch="arm"'), | 183 ('target_arch', 'arm', 'cpu_arch="arm"'), |
183 ('target_arch', 'mipsel', 'cpu_arch="mipsel"'), | 184 ('target_arch', 'mipsel', 'cpu_arch="mipsel"'), |
184 ('fastbuild', '0', 'symbol_level=2'), | 185 ('fastbuild', '0', 'symbol_level=2'), |
185 ('fastbuild', '1', 'symbol_level=1'), | 186 ('fastbuild', '1', 'symbol_level=1'), |
186 ('fastbuild', '2', 'symbol_level=0'), | 187 ('fastbuild', '2', 'symbol_level=0'), |
187 ('OS', 'ios', 'os="ios"'), | 188 ('OS', 'ios', 'os="ios"'), |
188 ('OS', 'android', 'os="android"'), | 189 ('OS', 'android', 'os="android"'), |
189 ('chromeos', '1', 'os="chromeos"'), | 190 ('chromeos', '1', 'os="chromeos"'), |
190 ('use_aura', '1', 'use_aura=true'), | 191 ('use_aura', '1', 'use_aura=true'), |
191 ('use_goma', '1', 'use_goma=true'), | 192 ('use_goma', '1', 'use_goma=true'), |
192 ('asan', '1', 'is_asan=true'), | 193 ('asan', '1', 'is_asan=true'), |
193 ('lsan', '1', 'is_lsan=true'), | 194 ('lsan', '1', 'is_lsan=true'), |
| 195 ('tsan', '1', 'is_tsan=true'), |
194 ] | 196 ] |
195 for i in remap_cases: | 197 for i in remap_cases: |
196 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: | 198 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: |
197 gn_args += ' ' + i[2] | 199 gn_args += ' ' + i[2] |
198 | 200 |
199 # These string arguments get passed directly as GN strings. | 201 # These string arguments get passed directly as GN strings. |
200 for v in ['android_src', 'windows_sdk_path']: | 202 for v in ['android_src', 'windows_sdk_path']: |
201 if v in vars_dict: | 203 if v in vars_dict: |
202 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) | 204 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) |
203 | 205 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 if not RunGN(supplemental_includes): | 391 if not RunGN(supplemental_includes): |
390 sys.exit(1) | 392 sys.exit(1) |
391 args.extend( | 393 args.extend( |
392 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) | 394 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) |
393 | 395 |
394 print 'Updating projects from gyp files...' | 396 print 'Updating projects from gyp files...' |
395 sys.stdout.flush() | 397 sys.stdout.flush() |
396 | 398 |
397 # Off we go... | 399 # Off we go... |
398 sys.exit(gyp.main(args)) | 400 sys.exit(gyp.main(args)) |
OLD | NEW |