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

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

Issue 11236042: ninja windows: add flag support for code analysis (aka PREfast) (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: copyright Created 8 years, 1 month 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 | test/lib/TestGyp.py » ('j') | 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 cl('DebugInformationFormat', 295 cl('DebugInformationFormat',
296 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z') 296 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z')
297 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'}) 297 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'})
298 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'}) 298 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'})
299 cl('MinimalRebuild', map={'true': '/Gm'}) 299 cl('MinimalRebuild', map={'true': '/Gm'})
300 cl('BufferSecurityCheck', map={'true': '/GS', 'false': '/GS-'}) 300 cl('BufferSecurityCheck', map={'true': '/GS', 'false': '/GS-'})
301 cl('BasicRuntimeChecks', map={'1': 's', '2': 'u', '3': '1'}, prefix='/RTC') 301 cl('BasicRuntimeChecks', map={'1': 's', '2': 'u', '3': '1'}, prefix='/RTC')
302 cl('RuntimeLibrary', 302 cl('RuntimeLibrary',
303 map={'0': 'T', '1': 'Td', '2': 'D', '3': 'Dd'}, prefix='/M') 303 map={'0': 'T', '1': 'Td', '2': 'D', '3': 'Dd'}, prefix='/M')
304 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH') 304 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH')
305 cl('EnablePREfast', map={'true': '/analyze'})
305 cl('AdditionalOptions', prefix='') 306 cl('AdditionalOptions', prefix='')
306 # ninja handles parallelism by itself, don't have the compiler do it too. 307 # ninja handles parallelism by itself, don't have the compiler do it too.
307 cflags = filter(lambda x: not x.startswith('/MP'), cflags) 308 cflags = filter(lambda x: not x.startswith('/MP'), cflags)
308 return cflags 309 return cflags
309 310
310 def GetPrecompiledHeader(self, config, gyp_to_build_path): 311 def GetPrecompiledHeader(self, config, gyp_to_build_path):
311 """Returns an object that handles the generation of precompiled header 312 """Returns an object that handles the generation of precompiled header
312 build steps.""" 313 build steps."""
313 config = self._RealConfig(config) 314 config = self._RealConfig(config)
314 return _PchHelper(self, config, gyp_to_build_path) 315 return _PchHelper(self, config, gyp_to_build_path)
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 args = vs.SetupScript(arch) 683 args = vs.SetupScript(arch)
683 args.extend(('&&', 'set')) 684 args.extend(('&&', 'set'))
684 popen = subprocess.Popen( 685 popen = subprocess.Popen(
685 args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 686 args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
686 variables, _ = popen.communicate() 687 variables, _ = popen.communicate()
687 env = _ExtractImportantEnvironment(variables) 688 env = _ExtractImportantEnvironment(variables)
688 env_block = _FormatAsEnvironmentBlock(env) 689 env_block = _FormatAsEnvironmentBlock(env)
689 f = open_out(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb') 690 f = open_out(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb')
690 f.write(env_block) 691 f.write(env_block)
691 f.close() 692 f.close()
OLDNEW
« no previous file with comments | « no previous file | test/lib/TestGyp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698