OLD | NEW |
---|---|
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
356 cl('RuntimeLibrary', | 356 cl('RuntimeLibrary', |
357 map={'0': 'T', '1': 'Td', '2': 'D', '3': 'Dd'}, prefix='/M') | 357 map={'0': 'T', '1': 'Td', '2': 'D', '3': 'Dd'}, prefix='/M') |
358 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH') | 358 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH') |
359 cl('DefaultCharIsUnsigned', map={'true': '/J'}) | 359 cl('DefaultCharIsUnsigned', map={'true': '/J'}) |
360 cl('TreatWChar_tAsBuiltInType', | 360 cl('TreatWChar_tAsBuiltInType', |
361 map={'false': '-', 'true': ''}, prefix='/Zc:wchar_t') | 361 map={'false': '-', 'true': ''}, prefix='/Zc:wchar_t') |
362 cl('EnablePREfast', map={'true': '/analyze'}) | 362 cl('EnablePREfast', map={'true': '/analyze'}) |
363 cl('AdditionalOptions', prefix='') | 363 cl('AdditionalOptions', prefix='') |
364 cflags.extend(['/FI' + f for f in self._Setting( | 364 cflags.extend(['/FI' + f for f in self._Setting( |
365 ('VCCLCompilerTool', 'ForcedIncludeFiles'), config, default=[])]) | 365 ('VCCLCompilerTool', 'ForcedIncludeFiles'), config, default=[])]) |
366 if self.vs_version.short_name == '2013' or self.vs_version == '2013e': | 366 if (self.vs_version.short_name == '2013' or |
367 self.vs_version.short_name == '2013e'): | |
scottmg
2013/11/08 21:43:39
This was just a typo. :/
Nico
2013/11/09 04:20:31
if self.vs_version.short_name in ['2013', '2013e']
scottmg
2013/11/09 04:47:33
Done.
| |
367 # New flag required in 2013 to maintain previous PDB behavior. | 368 # New flag required in 2013 to maintain previous PDB behavior. |
368 cflags.append('/FS') | 369 cflags.append('/FS') |
369 # ninja handles parallelism by itself, don't have the compiler do it too. | 370 # ninja handles parallelism by itself, don't have the compiler do it too. |
370 cflags = filter(lambda x: not x.startswith('/MP'), cflags) | 371 cflags = filter(lambda x: not x.startswith('/MP'), cflags) |
371 return cflags | 372 return cflags |
372 | 373 |
373 def GetPrecompiledHeader(self, config, gyp_to_build_path): | 374 def GetPrecompiledHeader(self, config, gyp_to_build_path): |
374 """Returns an object that handles the generation of precompiled header | 375 """Returns an object that handles the generation of precompiled header |
375 build steps.""" | 376 build steps.""" |
376 config = self._TargetConfig(config) | 377 config = self._TargetConfig(config) |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
861 | 862 |
862 # To determine processor word size on Windows, in addition to checking | 863 # To determine processor word size on Windows, in addition to checking |
863 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 864 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
864 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 865 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
865 # contains the actual word size of the system when running thru WOW64). | 866 # contains the actual word size of the system when running thru WOW64). |
866 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 867 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
867 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 868 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
868 default_variables['MSVS_OS_BITS'] = 64 | 869 default_variables['MSVS_OS_BITS'] = 64 |
869 else: | 870 else: |
870 default_variables['MSVS_OS_BITS'] = 32 | 871 default_variables['MSVS_OS_BITS'] = 32 |
OLD | NEW |