| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 os.environ['GYP_GENERATORS'] = 'ninja' | 451 os.environ['GYP_GENERATORS'] = 'ninja' |
| 452 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ | 452 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ |
| 453 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): | 453 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): |
| 454 os.environ['GYP_GENERATORS'] = 'ninja' | 454 os.environ['GYP_GENERATORS'] = 'ninja' |
| 455 | 455 |
| 456 # If on Windows, request that depot_tools install/update the automatic | 456 # If on Windows, request that depot_tools install/update the automatic |
| 457 # toolchain, and then use it (unless opted-out). | 457 # toolchain, and then use it (unless opted-out). |
| 458 vs2013_runtime_dll_dirs = None | 458 vs2013_runtime_dll_dirs = None |
| 459 # TODO(scottmg): Temporarily default to off, see http://crbug.com/345993. | 459 # TODO(scottmg): Temporarily default to off, see http://crbug.com/345993. |
| 460 depot_tools_win_toolchain = \ | 460 depot_tools_win_toolchain = \ |
| 461 bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1'))) | 461 bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '0'))) |
| 462 if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain: | 462 if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain: |
| 463 import find_depot_tools | 463 import find_depot_tools |
| 464 depot_tools_path = find_depot_tools.add_depot_tools_to_path() | 464 depot_tools_path = find_depot_tools.add_depot_tools_to_path() |
| 465 temp_handle, data_file = tempfile.mkstemp(suffix='.json') | 465 temp_handle, data_file = tempfile.mkstemp(suffix='.json') |
| 466 os.close(temp_handle) | 466 os.close(temp_handle) |
| 467 get_toolchain_args = [ | 467 get_toolchain_args = [ |
| 468 sys.executable, | 468 sys.executable, |
| 469 os.path.join(depot_tools_path, | 469 os.path.join(depot_tools_path, |
| 470 'win_toolchain', | 470 'win_toolchain', |
| 471 'get_toolchain_if_necessary.py'), | 471 'get_toolchain_if_necessary.py'), |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 print 'Running build/landmines.py...' | 541 print 'Running build/landmines.py...' |
| 542 subprocess.check_call( | 542 subprocess.check_call( |
| 543 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 543 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
| 544 | 544 |
| 545 if vs2013_runtime_dll_dirs: | 545 if vs2013_runtime_dll_dirs: |
| 546 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 546 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 547 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), | 547 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), |
| 548 (x86_runtime, x64_runtime)) | 548 (x86_runtime, x64_runtime)) |
| 549 | 549 |
| 550 sys.exit(gyp_rc) | 550 sys.exit(gyp_rc) |
| OLD | NEW |