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

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

Issue 861273003: Reland "msvs/ninja win: Fix support for ImageHasSafeExceptionHandlers" (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 5 years, 11 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 ld('LinkTimeCodeGeneration', 599 ld('LinkTimeCodeGeneration',
600 map={'1': '', '2': ':PGINSTRUMENT', '3': ':PGOPTIMIZE', 600 map={'1': '', '2': ':PGINSTRUMENT', '3': ':PGOPTIMIZE',
601 '4': ':PGUPDATE'}, 601 '4': ':PGUPDATE'},
602 prefix='/LTCG') 602 prefix='/LTCG')
603 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:') 603 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:')
604 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'}) 604 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'})
605 ld('EntryPointSymbol', prefix='/ENTRY:') 605 ld('EntryPointSymbol', prefix='/ENTRY:')
606 ld('Profile', map={'true': '/PROFILE'}) 606 ld('Profile', map={'true': '/PROFILE'})
607 ld('LargeAddressAware', 607 ld('LargeAddressAware',
608 map={'1': ':NO', '2': ''}, prefix='/LARGEADDRESSAWARE') 608 map={'1': ':NO', '2': ''}, prefix='/LARGEADDRESSAWARE')
609 ld('ImageHasSafeExceptionHandlers', map={'true': '/SAFESEH'})
610 # TODO(scottmg): This should sort of be somewhere else (not really a flag). 609 # TODO(scottmg): This should sort of be somewhere else (not really a flag).
611 ld('AdditionalDependencies', prefix='') 610 ld('AdditionalDependencies', prefix='')
612 611
612 if self.GetArch(config) == 'x86':
613 safeseh_default = 'true'
614 else:
615 safeseh_default = None
616 ld('ImageHasSafeExceptionHandlers',
617 map={'false': ':NO', 'true': ''}, prefix='/SAFESEH',
618 default=safeseh_default)
619
613 # If the base address is not specifically controlled, DYNAMICBASE should 620 # If the base address is not specifically controlled, DYNAMICBASE should
614 # be on by default. 621 # be on by default.
615 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED', 622 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED',
616 ldflags) 623 ldflags)
617 if not base_flags: 624 if not base_flags:
618 ldflags.append('/DYNAMICBASE') 625 ldflags.append('/DYNAMICBASE')
619 626
620 # If the NXCOMPAT flag has not been specified, default to on. Despite the 627 # If the NXCOMPAT flag has not been specified, default to on. Despite the
621 # documentation that says this only defaults to on when the subsystem is 628 # documentation that says this only defaults to on when the subsystem is
622 # Vista or greater (which applies to the linker), the IDE defaults it on 629 # Vista or greater (which applies to the linker), the IDE defaults it on
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 1060
1054 # To determine processor word size on Windows, in addition to checking 1061 # To determine processor word size on Windows, in addition to checking
1055 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current 1062 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current
1056 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which 1063 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which
1057 # contains the actual word size of the system when running thru WOW64). 1064 # contains the actual word size of the system when running thru WOW64).
1058 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or 1065 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or
1059 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): 1066 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')):
1060 default_variables['MSVS_OS_BITS'] = 64 1067 default_variables['MSVS_OS_BITS'] = 64
1061 else: 1068 else:
1062 default_variables['MSVS_OS_BITS'] = 32 1069 default_variables['MSVS_OS_BITS'] = 32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698