Chromium Code Reviews| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 311 | 311 |
| 312 def AdjustIncludeDirs(self, include_dirs, config): | 312 def AdjustIncludeDirs(self, include_dirs, config): |
| 313 """Updates include_dirs to expand VS specific paths, and adds the system | 313 """Updates include_dirs to expand VS specific paths, and adds the system |
| 314 include dirs used for platform SDK and similar.""" | 314 include dirs used for platform SDK and similar.""" |
| 315 config = self._TargetConfig(config) | 315 config = self._TargetConfig(config) |
| 316 includes = include_dirs + self.msvs_system_include_dirs[config] | 316 includes = include_dirs + self.msvs_system_include_dirs[config] |
| 317 includes.extend(self._Setting( | 317 includes.extend(self._Setting( |
| 318 ('VCCLCompilerTool', 'AdditionalIncludeDirectories'), config, default=[])) | 318 ('VCCLCompilerTool', 'AdditionalIncludeDirectories'), config, default=[])) |
| 319 return [self.ConvertVSMacros(p, config=config) for p in includes] | 319 return [self.ConvertVSMacros(p, config=config) for p in includes] |
| 320 | 320 |
| 321 def AdjustMidlIncludeDirs(self, midl_include_dirs, config): | |
| 322 """Updates midl_include_dirs to expand VS specific paths, and adds any | |
| 323 AdditionalIncludeDirectories specified in VCMIDLTool.""" | |
| 324 config = self._TargetConfig(config) | |
| 325 includes = midl_include_dirs + self._Setting( | |
|
scottmg
2014/09/25 17:17:50
similiarly here the same as above
| |
| 326 ('VCMIDLTool', 'AdditionalIncludeDirectories'), config, default=[]) | |
| 327 return [self.ConvertVSMacros(p, config=config) for p in includes] | |
| 328 | |
| 321 def GetComputedDefines(self, config): | 329 def GetComputedDefines(self, config): |
| 322 """Returns the set of defines that are injected to the defines list based | 330 """Returns the set of defines that are injected to the defines list based |
| 323 on other VS settings.""" | 331 on other VS settings.""" |
| 324 config = self._TargetConfig(config) | 332 config = self._TargetConfig(config) |
| 325 defines = [] | 333 defines = [] |
| 326 if self._ConfigAttrib(['CharacterSet'], config) == '1': | 334 if self._ConfigAttrib(['CharacterSet'], config) == '1': |
| 327 defines.extend(('_UNICODE', 'UNICODE')) | 335 defines.extend(('_UNICODE', 'UNICODE')) |
| 328 if self._ConfigAttrib(['CharacterSet'], config) == '2': | 336 if self._ConfigAttrib(['CharacterSet'], config) == '2': |
| 329 defines.append('_MBCS') | 337 defines.append('_MBCS') |
| 330 defines.extend(self._Setting( | 338 defines.extend(self._Setting( |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1020 | 1028 |
| 1021 # To determine processor word size on Windows, in addition to checking | 1029 # To determine processor word size on Windows, in addition to checking |
| 1022 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 1030 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
| 1023 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 1031 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
| 1024 # contains the actual word size of the system when running thru WOW64). | 1032 # contains the actual word size of the system when running thru WOW64). |
| 1025 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 1033 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
| 1026 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 1034 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
| 1027 default_variables['MSVS_OS_BITS'] = 64 | 1035 default_variables['MSVS_OS_BITS'] = 64 |
| 1028 else: | 1036 else: |
| 1029 default_variables['MSVS_OS_BITS'] = 32 | 1037 default_variables['MSVS_OS_BITS'] = 32 |
| OLD | NEW |