Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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'}) | 609 ld('ImageHasSafeExceptionHandlers', |
| 610 map={'false': ':NO', 'true': ''}, prefix='/SAFESEH') | |
|
scottmg
2015/01/19 20:17:14
Does test\win\gyptest-link-safeseh.py work on msvs
| |
| 610 # TODO(scottmg): This should sort of be somewhere else (not really a flag). | 611 # TODO(scottmg): This should sort of be somewhere else (not really a flag). |
| 611 ld('AdditionalDependencies', prefix='') | 612 ld('AdditionalDependencies', prefix='') |
| 612 | 613 |
| 613 # If the base address is not specifically controlled, DYNAMICBASE should | 614 # If the base address is not specifically controlled, DYNAMICBASE should |
| 614 # be on by default. | 615 # be on by default. |
| 615 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED', | 616 base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED', |
| 616 ldflags) | 617 ldflags) |
| 617 if not base_flags: | 618 if not base_flags: |
| 618 ldflags.append('/DYNAMICBASE') | 619 ldflags.append('/DYNAMICBASE') |
| 619 | 620 |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1053 | 1054 |
| 1054 # To determine processor word size on Windows, in addition to checking | 1055 # To determine processor word size on Windows, in addition to checking |
| 1055 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 1056 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
| 1056 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 1057 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
| 1057 # contains the actual word size of the system when running thru WOW64). | 1058 # contains the actual word size of the system when running thru WOW64). |
| 1058 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 1059 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
| 1059 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 1060 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
| 1060 default_variables['MSVS_OS_BITS'] = 64 | 1061 default_variables['MSVS_OS_BITS'] = 64 |
| 1061 else: | 1062 else: |
| 1062 default_variables['MSVS_OS_BITS'] = 32 | 1063 default_variables['MSVS_OS_BITS'] = 32 |
| OLD | NEW |