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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 if 'make' in os.environ.get('GYP_GENERATORS', ''): | 517 if 'make' in os.environ.get('GYP_GENERATORS', ''): |
518 print 'Error: make gyp generator not supported (check GYP_GENERATORS).' | 518 print 'Error: make gyp generator not supported (check GYP_GENERATORS).' |
519 sys.exit(1) | 519 sys.exit(1) |
520 | 520 |
521 # Default to ninja on linux and windows, but only if no generator has | 521 # Default to ninja on linux and windows, but only if no generator has |
522 # explicitly been set. | 522 # explicitly been set. |
523 # Also default to ninja on mac, but only when not building chrome/ios. | 523 # Also default to ninja on mac, but only when not building chrome/ios. |
524 # . -f / --format has precedence over the env var, no need to check for it | 524 # . -f / --format has precedence over the env var, no need to check for it |
525 # . set the env var only if it hasn't been set yet | 525 # . set the env var only if it hasn't been set yet |
526 # . chromium.gyp_env has been applied to os.environ at this point already | 526 # . chromium.gyp_env has been applied to os.environ at this point already |
527 if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'): | 527 if sys.platform.startswith(('linux', 'win', 'freebsd')) and \ |
528 os.environ['GYP_GENERATORS'] = 'ninja' | 528 not os.environ.get('GYP_GENERATORS'): |
529 if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'): | |
530 os.environ['GYP_GENERATORS'] = 'ninja' | 529 os.environ['GYP_GENERATORS'] = 'ninja' |
531 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ | 530 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ |
532 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): | 531 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): |
533 os.environ['GYP_GENERATORS'] = 'ninja' | 532 os.environ['GYP_GENERATORS'] = 'ninja' |
534 | 533 |
535 vs2013_runtime_dll_dirs = DownloadVsToolChain() | 534 vs2013_runtime_dll_dirs = DownloadVsToolChain() |
536 | 535 |
537 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check | 536 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check |
538 # to enfore syntax checking. | 537 # to enfore syntax checking. |
539 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 538 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
(...skipping 30 matching lines...) Expand all Loading... |
570 print 'Running build/landmines.py...' | 569 print 'Running build/landmines.py...' |
571 subprocess.check_call( | 570 subprocess.check_call( |
572 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 571 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
573 | 572 |
574 if vs2013_runtime_dll_dirs: | 573 if vs2013_runtime_dll_dirs: |
575 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 574 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
576 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), | 575 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), |
577 (x86_runtime, x64_runtime)) | 576 (x86_runtime, x64_runtime)) |
578 | 577 |
579 sys.exit(gyp_rc) | 578 sys.exit(gyp_rc) |
OLD | NEW |