Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: build/gyp_chromium

Issue 166203004: Merge 252604 "Don't use automatic toolchain if GYP_MSVS_VERSION ..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 os.environ['GYP_GENERATORS'] = 'ninja' 430 os.environ['GYP_GENERATORS'] = 'ninja'
431 if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'): 431 if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'):
432 os.environ['GYP_GENERATORS'] = 'ninja' 432 os.environ['GYP_GENERATORS'] = 'ninja'
433 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ 433 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \
434 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): 434 not 'OS=ios' in os.environ.get('GYP_DEFINES', []):
435 os.environ['GYP_GENERATORS'] = 'ninja' 435 os.environ['GYP_GENERATORS'] = 'ninja'
436 436
437 # If on windows, and the automatic toolchain has been installed by 437 # If on windows, and the automatic toolchain has been installed by
438 # depot_tools, then use it. 438 # depot_tools, then use it.
439 vs2013_runtime_dll_dirs = None 439 vs2013_runtime_dll_dirs = None
440 if sys.platform in ('win32', 'cygwin'): 440 # If MSVS_VERSION is explicitly specified to be something other than 2013,
441 # don't use the automatic toolchain, as it currently only supports VS2013.
442 msvs_version = os.environ.get('GYP_MSVS_VERSION', '2013')
443 if sys.platform in ('win32', 'cygwin') and msvs_version.startswith('2013'):
441 depot_tools_path = find_depot_tools.add_depot_tools_to_path() 444 depot_tools_path = find_depot_tools.add_depot_tools_to_path()
442 toolchain = os.path.normpath(os.path.join( 445 toolchain = os.path.normpath(os.path.join(
443 depot_tools_path, 'win_toolchain', 'vs2013_files')) 446 depot_tools_path, 'win_toolchain', 'vs2013_files'))
444 version_file = os.path.join(toolchain, '.version') 447 version_file = os.path.join(toolchain, '.version')
445 if os.path.isdir(toolchain) and os.path.isfile(version_file): 448 if os.path.isdir(toolchain) and os.path.isfile(version_file):
446 os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain 449 os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain
447 with open(version_file, 'r') as f: 450 with open(version_file, 'r') as f:
448 version_is_pro = f.read().strip() == 'pro' 451 version_is_pro = f.read().strip() == 'pro'
449 vs2013_runtime_dll_dirs = (os.path.join(toolchain, 'sys32'), 452 vs2013_runtime_dll_dirs = (os.path.join(toolchain, 'sys32'),
450 os.path.join(toolchain, 'sys64')) 453 os.path.join(toolchain, 'sys64'))
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 # rather than a separate runhooks step so that any environment modifications 494 # rather than a separate runhooks step so that any environment modifications
492 # from above are picked up. 495 # from above are picked up.
493 print 'Running build/landmines.py...' 496 print 'Running build/landmines.py...'
494 subprocess.check_call( 497 subprocess.check_call(
495 [sys.executable, os.path.join(script_dir, 'landmines.py')]) 498 [sys.executable, os.path.join(script_dir, 'landmines.py')])
496 499
497 if vs2013_runtime_dll_dirs: 500 if vs2013_runtime_dll_dirs:
498 CopyVsRuntimeDlls(GetOutputDirectory(), vs2013_runtime_dll_dirs) 501 CopyVsRuntimeDlls(GetOutputDirectory(), vs2013_runtime_dll_dirs)
499 502
500 sys.exit(gyp_rc) 503 sys.exit(gyp_rc)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698