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

Side by Side Diff: build/gyp_chromium

Issue 174143003: Don't use automatic toolchain if GYP_MSVS_VERSION overridden to another version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reitveld 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 os.environ['GYP_GENERATORS'] = 'ninja' 435 os.environ['GYP_GENERATORS'] = 'ninja'
436 if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'): 436 if sys.platform.startswith('win') and not os.environ.get('GYP_GENERATORS'):
437 os.environ['GYP_GENERATORS'] = 'ninja' 437 os.environ['GYP_GENERATORS'] = 'ninja'
438 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ 438 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \
439 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): 439 not 'OS=ios' in os.environ.get('GYP_DEFINES', []):
440 os.environ['GYP_GENERATORS'] = 'ninja' 440 os.environ['GYP_GENERATORS'] = 'ninja'
441 441
442 # If on windows, and the automatic toolchain has been installed by 442 # If on windows, and the automatic toolchain has been installed by
443 # depot_tools, then use it. 443 # depot_tools, then use it.
444 vs2013_runtime_dll_dirs = None 444 vs2013_runtime_dll_dirs = None
445 if sys.platform in ('win32', 'cygwin'): 445 # If MSVS_VERSION is explicitly specified to be something other than 2013,
446 # don't use the automatic toolchain, as it currently only supports VS2013.
447 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSION')
M-A Ruel 2014/02/21 13:20:55 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSIO
scottmg 2014/02/21 16:52:23 Done.
448 if (sys.platform in ('win32', 'cygwin') and
449 (not gyp_msvs_version or gyp_msvs_version.startswith('2013'))):
M-A Ruel 2014/02/21 13:20:55 you can remove the not gyp_msvs_version this way.
scottmg 2014/02/21 16:52:23 Done.
446 depot_tools_path = find_depot_tools.add_depot_tools_to_path() 450 depot_tools_path = find_depot_tools.add_depot_tools_to_path()
447 toolchain = os.path.normpath(os.path.join( 451 toolchain = os.path.normpath(os.path.join(
448 depot_tools_path, 'win_toolchain', 'vs2013_files')) 452 depot_tools_path, 'win_toolchain', 'vs2013_files'))
449 version_file = os.path.join(toolchain, '.version') 453 version_file = os.path.join(toolchain, '.version')
450 if os.path.isdir(toolchain) and os.path.isfile(version_file): 454 if os.path.isdir(toolchain) and os.path.isfile(version_file):
451 os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain 455 os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain
452 with open(version_file, 'r') as f: 456 with open(version_file, 'r') as f:
453 version_is_pro = f.read().strip() == 'pro' 457 version_is_pro = f.read().strip() == 'pro'
454 vs2013_runtime_dll_dirs = (os.path.join(toolchain, 'sys32'), 458 vs2013_runtime_dll_dirs = (os.path.join(toolchain, 'sys32'),
455 os.path.join(toolchain, 'sys64')) 459 os.path.join(toolchain, 'sys64'))
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 # rather than a separate runhooks step so that any environment modifications 500 # rather than a separate runhooks step so that any environment modifications
497 # from above are picked up. 501 # from above are picked up.
498 print 'Running build/landmines.py...' 502 print 'Running build/landmines.py...'
499 subprocess.check_call( 503 subprocess.check_call(
500 [sys.executable, os.path.join(script_dir, 'landmines.py')]) 504 [sys.executable, os.path.join(script_dir, 'landmines.py')])
501 505
502 if vs2013_runtime_dll_dirs: 506 if vs2013_runtime_dll_dirs:
503 CopyVsRuntimeDlls(GetOutputDirectory(), vs2013_runtime_dll_dirs) 507 CopyVsRuntimeDlls(GetOutputDirectory(), vs2013_runtime_dll_dirs)
504 508
505 sys.exit(gyp_rc) 509 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