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

Side by Side Diff: pylib/gyp/msvs_emulation.py

Issue 784363003: win: Add support for VS2015 (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « pylib/gyp/MSVSVersion.py ('k') | 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 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ 5 """
6 This module helps emulate Visual Studio 2008 behavior on top of other 6 This module helps emulate Visual Studio 2008 behavior on top of other
7 build systems, primarily ninja. 7 build systems, primarily ninja.
8 """ 8 """
9 9
10 import os 10 import os
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH') 452 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH')
453 cl('DefaultCharIsUnsigned', map={'true': '/J'}) 453 cl('DefaultCharIsUnsigned', map={'true': '/J'})
454 cl('TreatWChar_tAsBuiltInType', 454 cl('TreatWChar_tAsBuiltInType',
455 map={'false': '-', 'true': ''}, prefix='/Zc:wchar_t') 455 map={'false': '-', 'true': ''}, prefix='/Zc:wchar_t')
456 cl('EnablePREfast', map={'true': '/analyze'}) 456 cl('EnablePREfast', map={'true': '/analyze'})
457 cl('AdditionalOptions', prefix='') 457 cl('AdditionalOptions', prefix='')
458 cl('EnableEnhancedInstructionSet', 458 cl('EnableEnhancedInstructionSet',
459 map={'1': 'SSE', '2': 'SSE2', '3': 'AVX', '4': 'IA32'}, prefix='/arch:') 459 map={'1': 'SSE', '2': 'SSE2', '3': 'AVX', '4': 'IA32'}, prefix='/arch:')
460 cflags.extend(['/FI' + f for f in self._Setting( 460 cflags.extend(['/FI' + f for f in self._Setting(
461 ('VCCLCompilerTool', 'ForcedIncludeFiles'), config, default=[])]) 461 ('VCCLCompilerTool', 'ForcedIncludeFiles'), config, default=[])])
462 if self.vs_version.short_name in ('2013', '2013e'): 462 if self.vs_version.short_name in ('2013', '2013e', '2015'):
463 # New flag required in 2013 to maintain previous PDB behavior. 463 # New flag required in 2013 to maintain previous PDB behavior.
464 cflags.append('/FS') 464 cflags.append('/FS')
Shezan Baig (Bloomberg) 2014/12/09 20:30:00 I wonder if we should change the pdb path we pass
465 # ninja handles parallelism by itself, don't have the compiler do it too. 465 # ninja handles parallelism by itself, don't have the compiler do it too.
466 cflags = filter(lambda x: not x.startswith('/MP'), cflags) 466 cflags = filter(lambda x: not x.startswith('/MP'), cflags)
467 return cflags 467 return cflags
468 468
469 def _GetPchFlags(self, config, extension): 469 def _GetPchFlags(self, config, extension):
470 """Get the flags to be added to the cflags for precompiled header support. 470 """Get the flags to be added to the cflags for precompiled header support.
471 """ 471 """
472 config = self._TargetConfig(config) 472 config = self._TargetConfig(config)
473 # The PCH is only built once by a particular source file. Usage of PCH must 473 # The PCH is only built once by a particular source file. Usage of PCH must
474 # only be for the same language (i.e. C vs. C++), so only include the pch 474 # only be for the same language (i.e. C vs. C++), so only include the pch
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 1053
1054 # To determine processor word size on Windows, in addition to checking 1054 # To determine processor word size on Windows, in addition to checking
1055 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current 1055 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current
1056 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which 1056 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which
1057 # contains the actual word size of the system when running thru WOW64). 1057 # contains the actual word size of the system when running thru WOW64).
1058 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or 1058 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or
1059 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): 1059 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')):
1060 default_variables['MSVS_OS_BITS'] = 64 1060 default_variables['MSVS_OS_BITS'] = 64
1061 else: 1061 else:
1062 default_variables['MSVS_OS_BITS'] = 32 1062 default_variables['MSVS_OS_BITS'] = 32
OLDNEW
« no previous file with comments | « pylib/gyp/MSVSVersion.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698