| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """Classes and functions for building Chrome. | 5 """Classes and functions for building Chrome. |
| 6 | 6 |
| 7 This includes functions for running commands to build, as well as | 7 This includes functions for running commands to build, as well as |
| 8 specific rules about which targets to build. | 8 specific rules about which targets to build. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 if bisect_utils.IsWindowsHost(): | 33 if bisect_utils.IsWindowsHost(): |
| 34 if not opts.build_preference: | 34 if not opts.build_preference: |
| 35 opts.build_preference = 'msvs' | 35 opts.build_preference = 'msvs' |
| 36 | 36 |
| 37 if opts.build_preference == 'msvs': | 37 if opts.build_preference == 'msvs': |
| 38 if not os.getenv('VS100COMNTOOLS'): | 38 if not os.getenv('VS100COMNTOOLS'): |
| 39 raise RuntimeError( | 39 raise RuntimeError( |
| 40 'Path to visual studio could not be determined.') | 40 'Path to visual studio could not be determined.') |
| 41 else: | 41 else: |
| 42 SetBuildSystemDefault(opts.build_preference, opts.use_goma, | 42 SetBuildSystemDefault(opts.build_preference, opts.use_goma, |
| 43 opts.goma_dir) | 43 # Need to re-escape goma dir, see crbug.com/394990 |
| 44 opts.goma_dir.encode('string_escape')) |
| 44 else: | 45 else: |
| 45 if not opts.build_preference: | 46 if not opts.build_preference: |
| 46 if 'ninja' in os.getenv('GYP_GENERATORS', default=''): | 47 if 'ninja' in os.getenv('GYP_GENERATORS', default=''): |
| 47 opts.build_preference = 'ninja' | 48 opts.build_preference = 'ninja' |
| 48 else: | 49 else: |
| 49 opts.build_preference = 'make' | 50 opts.build_preference = 'make' |
| 50 | 51 |
| 51 SetBuildSystemDefault(opts.build_preference, opts.use_goma, opts.goma_dir) | 52 SetBuildSystemDefault(opts.build_preference, opts.use_goma, opts.goma_dir) |
| 52 | 53 |
| 53 if not SetupPlatformBuildEnvironment(opts): | 54 if not SetupPlatformBuildEnvironment(opts): |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 # (See http://crrev.com/170273005). So, we set this variable explicitly here | 448 # (See http://crrev.com/170273005). So, we set this variable explicitly here |
| 448 # in order to build Chrome on Android. | 449 # in order to build Chrome on Android. |
| 449 if 'GYP_DEFINES' not in os.environ: | 450 if 'GYP_DEFINES' not in os.environ: |
| 450 os.environ['GYP_DEFINES'] = 'OS=android' | 451 os.environ['GYP_DEFINES'] = 'OS=android' |
| 451 else: | 452 else: |
| 452 os.environ['GYP_DEFINES'] += ' OS=android' | 453 os.environ['GYP_DEFINES'] += ' OS=android' |
| 453 | 454 |
| 454 if opts.use_goma: | 455 if opts.use_goma: |
| 455 os.environ['GYP_DEFINES'] += ' use_goma=1' | 456 os.environ['GYP_DEFINES'] += ' use_goma=1' |
| 456 return not proc.returncode | 457 return not proc.returncode |
| OLD | NEW |