| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 cl('InlineFunctionExpansion', prefix='/Ob') | 399 cl('InlineFunctionExpansion', prefix='/Ob') |
| 400 cl('DisableSpecificWarnings', prefix='/wd') | 400 cl('DisableSpecificWarnings', prefix='/wd') |
| 401 cl('StringPooling', map={'true': '/GF'}) | 401 cl('StringPooling', map={'true': '/GF'}) |
| 402 cl('EnableFiberSafeOptimizations', map={'true': '/GT'}) | 402 cl('EnableFiberSafeOptimizations', map={'true': '/GT'}) |
| 403 cl('OmitFramePointers', map={'false': '-', 'true': ''}, prefix='/Oy') | 403 cl('OmitFramePointers', map={'false': '-', 'true': ''}, prefix='/Oy') |
| 404 cl('EnableIntrinsicFunctions', map={'false': '-', 'true': ''}, prefix='/Oi') | 404 cl('EnableIntrinsicFunctions', map={'false': '-', 'true': ''}, prefix='/Oi') |
| 405 cl('FavorSizeOrSpeed', map={'1': 't', '2': 's'}, prefix='/O') | 405 cl('FavorSizeOrSpeed', map={'1': 't', '2': 's'}, prefix='/O') |
| 406 cl('WholeProgramOptimization', map={'true': '/GL'}) | 406 cl('WholeProgramOptimization', map={'true': '/GL'}) |
| 407 cl('WarningLevel', prefix='/W') | 407 cl('WarningLevel', prefix='/W') |
| 408 cl('WarnAsError', map={'true': '/WX'}) | 408 cl('WarnAsError', map={'true': '/WX'}) |
| 409 cl('CallingConvention', |
| 410 map={'0': 'd', '1': 'r', '2': 'z'}, prefix='/G') |
| 409 cl('DebugInformationFormat', | 411 cl('DebugInformationFormat', |
| 410 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z') | 412 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z') |
| 411 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'}) | 413 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'}) |
| 412 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'}) | 414 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'}) |
| 413 cl('MinimalRebuild', map={'true': '/Gm'}) | 415 cl('MinimalRebuild', map={'true': '/Gm'}) |
| 414 cl('BufferSecurityCheck', map={'true': '/GS', 'false': '/GS-'}) | 416 cl('BufferSecurityCheck', map={'true': '/GS', 'false': '/GS-'}) |
| 415 cl('BasicRuntimeChecks', map={'1': 's', '2': 'u', '3': '1'}, prefix='/RTC') | 417 cl('BasicRuntimeChecks', map={'1': 's', '2': 'u', '3': '1'}, prefix='/RTC') |
| 416 cl('RuntimeLibrary', | 418 cl('RuntimeLibrary', |
| 417 map={'0': 'T', '1': 'Td', '2': 'D', '3': 'Dd'}, prefix='/M') | 419 map={'0': 'T', '1': 'Td', '2': 'D', '3': 'Dd'}, prefix='/M') |
| 418 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH') | 420 cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH') |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 | 1018 |
| 1017 # To determine processor word size on Windows, in addition to checking | 1019 # To determine processor word size on Windows, in addition to checking |
| 1018 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 1020 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
| 1019 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 1021 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
| 1020 # contains the actual word size of the system when running thru WOW64). | 1022 # contains the actual word size of the system when running thru WOW64). |
| 1021 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 1023 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
| 1022 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 1024 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
| 1023 default_variables['MSVS_OS_BITS'] = 64 | 1025 default_variables['MSVS_OS_BITS'] = 64 |
| 1024 else: | 1026 else: |
| 1025 default_variables['MSVS_OS_BITS'] = 32 | 1027 default_variables['MSVS_OS_BITS'] = 32 |
| OLD | NEW |