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

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

Issue 521693002: Added Windows 8.1/Windows Phone 8.1 minimal support for creating projects that compile modules that… (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Updated change based on codereview feedback. Created 6 years, 2 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
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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 469
470 def GetLibFlags(self, config, gyp_to_build_path): 470 def GetLibFlags(self, config, gyp_to_build_path):
471 """Returns the flags that need to be added to lib commands.""" 471 """Returns the flags that need to be added to lib commands."""
472 config = self._TargetConfig(config) 472 config = self._TargetConfig(config)
473 libflags = [] 473 libflags = []
474 lib = self._GetWrapper(self, self.msvs_settings[config], 474 lib = self._GetWrapper(self, self.msvs_settings[config],
475 'VCLibrarianTool', append=libflags) 475 'VCLibrarianTool', append=libflags)
476 libflags.extend(self._GetAdditionalLibraryDirectories( 476 libflags.extend(self._GetAdditionalLibraryDirectories(
477 'VCLibrarianTool', config, gyp_to_build_path)) 477 'VCLibrarianTool', config, gyp_to_build_path))
478 lib('LinkTimeCodeGeneration', map={'true': '/LTCG'}) 478 lib('LinkTimeCodeGeneration', map={'true': '/LTCG'})
479 lib('TargetMachine', map={'1': 'X86', '17': 'X64'}, prefix='/MACHINE:') 479 lib('TargetMachine', map={'1': 'X86', '17': 'X64'},
scottmg 2014/09/23 16:25:09 please revert this file
480 prefix='/MACHINE:')
480 lib('AdditionalOptions') 481 lib('AdditionalOptions')
481 return libflags 482 return libflags
482 483
483 def GetDefFile(self, gyp_to_build_path): 484 def GetDefFile(self, gyp_to_build_path):
484 """Returns the .def file from sources, if any. Otherwise returns None.""" 485 """Returns the .def file from sources, if any. Otherwise returns None."""
485 spec = self.spec 486 spec = self.spec
486 if spec['type'] in ('shared_library', 'loadable_module', 'executable'): 487 if spec['type'] in ('shared_library', 'loadable_module', 'executable'):
487 def_files = [s for s in spec.get('sources', []) if s.endswith('.def')] 488 def_files = [s for s in spec.get('sources', []) if s.endswith('.def')]
488 if len(def_files) == 1: 489 if len(def_files) == 1:
489 return gyp_to_build_path(def_files[0]) 490 return gyp_to_build_path(def_files[0])
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 1017
1017 # To determine processor word size on Windows, in addition to checking 1018 # To determine processor word size on Windows, in addition to checking
1018 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current 1019 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current
1019 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which 1020 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which
1020 # contains the actual word size of the system when running thru WOW64). 1021 # contains the actual word size of the system when running thru WOW64).
1021 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or 1022 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or
1022 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): 1023 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')):
1023 default_variables['MSVS_OS_BITS'] = 64 1024 default_variables['MSVS_OS_BITS'] = 64
1024 else: 1025 else:
1025 default_variables['MSVS_OS_BITS'] = 32 1026 default_variables['MSVS_OS_BITS'] = 32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698