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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 # currently exist. The check for circular dependencies is currently | 447 # currently exist. The check for circular dependencies is currently |
448 # bypassed on other platforms, but is left enabled on the Mac, where a | 448 # bypassed on other platforms, but is left enabled on the Mac, where a |
449 # violation of the rule causes Xcode to misbehave badly. | 449 # violation of the rule causes Xcode to misbehave badly. |
450 # TODO(mark): Find and kill remaining circular dependencies, and remove this | 450 # TODO(mark): Find and kill remaining circular dependencies, and remove this |
451 # option. http://crbug.com/35878. | 451 # option. http://crbug.com/35878. |
452 # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the | 452 # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the |
453 # list. | 453 # list. |
454 if sys.platform not in ('darwin',): | 454 if sys.platform not in ('darwin',): |
455 args.append('--no-circular-check') | 455 args.append('--no-circular-check') |
456 | 456 |
| 457 # We explicitly don't support the make gyp generator (crbug.com/348686). Be |
| 458 # nice and fail here, rather than choking in gyp. |
| 459 if 'make' in os.environ.get('GYP_GENERATORS', ''): |
| 460 print 'Error: make gyp generator not supported (check GYP_GENERATORS).' |
| 461 sys.exit(1) |
| 462 |
457 # Default to ninja on linux and windows, but only if no generator has | 463 # Default to ninja on linux and windows, but only if no generator has |
458 # explicitly been set. | 464 # explicitly been set. |
459 # Also default to ninja on mac, but only when not building chrome/ios. | 465 # Also default to ninja on mac, but only when not building chrome/ios. |
460 # . -f / --format has precedence over the env var, no need to check for it | 466 # . -f / --format has precedence over the env var, no need to check for it |
461 # . set the env var only if it hasn't been set yet | 467 # . set the env var only if it hasn't been set yet |
462 # . chromium.gyp_env has been applied to os.environ at this point already | 468 # . chromium.gyp_env has been applied to os.environ at this point already |
463 if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'): | 469 if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'): |
464 os.environ['GYP_GENERATORS'] = 'ninja' | 470 os.environ['GYP_GENERATORS'] = 'ninja' |
465 if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'): | 471 if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'): |
466 os.environ['GYP_GENERATORS'] = 'ninja' | 472 os.environ['GYP_GENERATORS'] = 'ninja' |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 print 'Running build/landmines.py...' | 561 print 'Running build/landmines.py...' |
556 subprocess.check_call( | 562 subprocess.check_call( |
557 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 563 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
558 | 564 |
559 if vs2013_runtime_dll_dirs: | 565 if vs2013_runtime_dll_dirs: |
560 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 566 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
561 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), | 567 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), |
562 (x86_runtime, x64_runtime)) | 568 (x86_runtime, x64_runtime)) |
563 | 569 |
564 sys.exit(gyp_rc) | 570 sys.exit(gyp_rc) |
OLD | NEW |