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

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

Issue 11304012: Add support at test for /PROFILE in Ninja (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: 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/win/gyptest-link-profile.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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 ld('RandomizedBaseAddress', 395 ld('RandomizedBaseAddress',
396 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE') 396 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE')
397 ld('DataExecutionPrevention', 397 ld('DataExecutionPrevention',
398 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT') 398 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT')
399 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:') 399 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:')
400 ld('EnableCOMDATFolding', map={'1': 'NOICF', '2': 'ICF'}, prefix='/OPT:') 400 ld('EnableCOMDATFolding', map={'1': 'NOICF', '2': 'ICF'}, prefix='/OPT:')
401 ld('LinkTimeCodeGeneration', map={'1': '/LTCG'}) 401 ld('LinkTimeCodeGeneration', map={'1': '/LTCG'})
402 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:') 402 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:')
403 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'}) 403 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'})
404 ld('EntryPointSymbol', prefix='/ENTRY:') 404 ld('EntryPointSymbol', prefix='/ENTRY:')
405 ld('Profile', map={ 'false': '', '': '', 'true': '/PROFILE'})
scottmg 2012/10/29 15:33:33 forgot this one?
405 # TODO(scottmg): This should sort of be somewhere else (not really a flag). 406 # TODO(scottmg): This should sort of be somewhere else (not really a flag).
406 ld('AdditionalDependencies', prefix='') 407 ld('AdditionalDependencies', prefix='')
407 # TODO(scottmg): These too. 408 # TODO(scottmg): These too.
408 ldflags.extend(('kernel32.lib', 'user32.lib', 'gdi32.lib', 'winspool.lib', 409 ldflags.extend(('kernel32.lib', 'user32.lib', 'gdi32.lib', 'winspool.lib',
409 'comdlg32.lib', 'advapi32.lib', 'shell32.lib', 'ole32.lib', 410 'comdlg32.lib', 'advapi32.lib', 'shell32.lib', 'ole32.lib',
410 'oleaut32.lib', 'uuid.lib', 'odbc32.lib', 'DelayImp.lib')) 411 'oleaut32.lib', 'uuid.lib', 'odbc32.lib', 'DelayImp.lib'))
411 412
412 # If the base address is not specifically controlled, DYNAMICBASE should 413 # If the base address is not specifically controlled, DYNAMICBASE should
413 # be on by default. 414 # be on by default.
414 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED', 415 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED',
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 args = vs.SetupScript(arch) 684 args = vs.SetupScript(arch)
684 args.extend(('&&', 'set')) 685 args.extend(('&&', 'set'))
685 popen = subprocess.Popen( 686 popen = subprocess.Popen(
686 args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 687 args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
687 variables, _ = popen.communicate() 688 variables, _ = popen.communicate()
688 env = _ExtractImportantEnvironment(variables) 689 env = _ExtractImportantEnvironment(variables)
689 env_block = _FormatAsEnvironmentBlock(env) 690 env_block = _FormatAsEnvironmentBlock(env)
690 f = open_out(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb') 691 f = open_out(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb')
691 f.write(env_block) 692 f.write(env_block)
692 f.close() 693 f.close()
OLDNEW
« no previous file with comments | « no previous file | test/win/gyptest-link-profile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698