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

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

Issue 10544049: ninja windows: support alternative entrypoints. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | test/win/gyptest-link-entrypointsymbol.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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 ld('FixedBaseAddress', map={'1': ':NO', '2': ''}, prefix='/FIXED') 353 ld('FixedBaseAddress', map={'1': ':NO', '2': ''}, prefix='/FIXED')
354 ld('RandomizedBaseAddress', 354 ld('RandomizedBaseAddress',
355 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE') 355 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE')
356 ld('DataExecutionPrevention', 356 ld('DataExecutionPrevention',
357 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT') 357 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT')
358 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:') 358 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:')
359 ld('EnableCOMDATFolding', map={'1': 'NOICF', '2': 'ICF'}, prefix='/OPT:') 359 ld('EnableCOMDATFolding', map={'1': 'NOICF', '2': 'ICF'}, prefix='/OPT:')
360 ld('LinkTimeCodeGeneration', map={'1': '/LTCG'}) 360 ld('LinkTimeCodeGeneration', map={'1': '/LTCG'})
361 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:') 361 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:')
362 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'}) 362 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'})
363 ld('EntryPointSymbol', prefix='/ENTRY:')
363 # TODO(scottmg): This should sort of be somewhere else (not really a flag). 364 # TODO(scottmg): This should sort of be somewhere else (not really a flag).
364 ld('AdditionalDependencies', prefix='') 365 ld('AdditionalDependencies', prefix='')
365 # TODO(scottmg): These too. 366 # TODO(scottmg): These too.
366 ldflags.extend(('kernel32.lib', 'user32.lib', 'gdi32.lib', 'winspool.lib', 367 ldflags.extend(('kernel32.lib', 'user32.lib', 'gdi32.lib', 'winspool.lib',
367 'comdlg32.lib', 'advapi32.lib', 'shell32.lib', 'ole32.lib', 368 'comdlg32.lib', 'advapi32.lib', 'shell32.lib', 'ole32.lib',
368 'oleaut32.lib', 'uuid.lib', 'odbc32.lib', 'DelayImp.lib')) 369 'oleaut32.lib', 'uuid.lib', 'odbc32.lib', 'DelayImp.lib'))
369 370
370 # If the base address is not specifically controlled, DYNAMICBASE should 371 # If the base address is not specifically controlled, DYNAMICBASE should
371 # be on by default. 372 # be on by default.
372 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED', 373 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED',
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 return vs.SetupScript() 550 return vs.SetupScript()
550 551
551 def ExpandMacros(string, expansions): 552 def ExpandMacros(string, expansions):
552 """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv 553 """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
553 for the canonical way to retrieve a suitable dict.""" 554 for the canonical way to retrieve a suitable dict."""
554 if '$' in string: 555 if '$' in string:
555 for old, new in expansions.iteritems(): 556 for old, new in expansions.iteritems():
556 assert '$(' not in new, new 557 assert '$(' not in new, new
557 string = string.replace(old, new) 558 string = string.replace(old, new)
558 return string 559 return string
OLDNEW
« no previous file with comments | « no previous file | test/win/gyptest-link-entrypointsymbol.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698