Index: pylib/gyp/msvs_emulation.py |
diff --git a/pylib/gyp/msvs_emulation.py b/pylib/gyp/msvs_emulation.py |
index 08aa9890e68bd0494421bba08c31c746d4819046..cd03b51dea50198ba53efca7bf175d0d2846d492 100644 |
--- a/pylib/gyp/msvs_emulation.py |
+++ b/pylib/gyp/msvs_emulation.py |
@@ -606,10 +606,17 @@ class MsvsSettings(object): |
ld('Profile', map={'true': '/PROFILE'}) |
ld('LargeAddressAware', |
map={'1': ':NO', '2': ''}, prefix='/LARGEADDRESSAWARE') |
- ld('ImageHasSafeExceptionHandlers', map={'true': '/SAFESEH'}) |
# TODO(scottmg): This should sort of be somewhere else (not really a flag). |
ld('AdditionalDependencies', prefix='') |
+ if self.GetArch(config) == 'x86': |
+ safeseh_default = 'true' |
+ else: |
+ safeseh_default = None |
+ ld('ImageHasSafeExceptionHandlers', |
+ map={'false': ':NO', 'true': ''}, prefix='/SAFESEH', |
+ default=safeseh_default) |
+ |
# If the base address is not specifically controlled, DYNAMICBASE should |
# be on by default. |
base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED', |