| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 | 586 |
| 587 minimum_required_version = self._Setting( | 587 minimum_required_version = self._Setting( |
| 588 ('VCLinkerTool', 'MinimumRequiredVersion'), config, default='') | 588 ('VCLinkerTool', 'MinimumRequiredVersion'), config, default='') |
| 589 if minimum_required_version: | 589 if minimum_required_version: |
| 590 minimum_required_version = ',' + minimum_required_version | 590 minimum_required_version = ',' + minimum_required_version |
| 591 ld('SubSystem', | 591 ld('SubSystem', |
| 592 map={'1': 'CONSOLE%s' % minimum_required_version, | 592 map={'1': 'CONSOLE%s' % minimum_required_version, |
| 593 '2': 'WINDOWS%s' % minimum_required_version}, | 593 '2': 'WINDOWS%s' % minimum_required_version}, |
| 594 prefix='/SUBSYSTEM:') | 594 prefix='/SUBSYSTEM:') |
| 595 | 595 |
| 596 stack_reserve_size = self._Setting( |
| 597 ('VCLinkerTool', 'StackReserveSize'), config, default='') |
| 598 if stack_reserve_size: |
| 599 stack_commit_size = self._Setting( |
| 600 ('VCLinkerTool', 'StackCommitSize'), config, default='') |
| 601 if stack_commit_size: |
| 602 stack_commit_size = ',' + stack_commit_size |
| 603 ldflags.append('/STACK:%s%s' % (stack_reserve_size, stack_commit_size)) |
| 604 |
| 596 ld('TerminalServerAware', map={'1': ':NO', '2': ''}, prefix='/TSAWARE') | 605 ld('TerminalServerAware', map={'1': ':NO', '2': ''}, prefix='/TSAWARE') |
| 597 ld('LinkIncremental', map={'1': ':NO', '2': ''}, prefix='/INCREMENTAL') | 606 ld('LinkIncremental', map={'1': ':NO', '2': ''}, prefix='/INCREMENTAL') |
| 598 ld('BaseAddress', prefix='/BASE:') | 607 ld('BaseAddress', prefix='/BASE:') |
| 599 ld('FixedBaseAddress', map={'1': ':NO', '2': ''}, prefix='/FIXED') | 608 ld('FixedBaseAddress', map={'1': ':NO', '2': ''}, prefix='/FIXED') |
| 600 ld('RandomizedBaseAddress', | 609 ld('RandomizedBaseAddress', |
| 601 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE') | 610 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE') |
| 602 ld('DataExecutionPrevention', | 611 ld('DataExecutionPrevention', |
| 603 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT') | 612 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT') |
| 604 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:') | 613 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:') |
| 605 ld('ForceSymbolReferences', prefix='/INCLUDE:') | 614 ld('ForceSymbolReferences', prefix='/INCLUDE:') |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 | 1077 |
| 1069 # To determine processor word size on Windows, in addition to checking | 1078 # To determine processor word size on Windows, in addition to checking |
| 1070 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 1079 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
| 1071 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 1080 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
| 1072 # contains the actual word size of the system when running thru WOW64). | 1081 # contains the actual word size of the system when running thru WOW64). |
| 1073 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 1082 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
| 1074 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 1083 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
| 1075 default_variables['MSVS_OS_BITS'] = 64 | 1084 default_variables['MSVS_OS_BITS'] = 64 |
| 1076 else: | 1085 else: |
| 1077 default_variables['MSVS_OS_BITS'] = 32 | 1086 default_variables['MSVS_OS_BITS'] = 32 |
| OLD | NEW |