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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 'VCCLCompilerTool', append=cflags) | 425 'VCCLCompilerTool', append=cflags) |
426 cl('Optimization', | 426 cl('Optimization', |
427 map={'0': 'd', '1': '1', '2': '2', '3': 'x'}, prefix='/O', default='2') | 427 map={'0': 'd', '1': '1', '2': '2', '3': 'x'}, prefix='/O', default='2') |
428 cl('InlineFunctionExpansion', prefix='/Ob') | 428 cl('InlineFunctionExpansion', prefix='/Ob') |
429 cl('DisableSpecificWarnings', prefix='/wd') | 429 cl('DisableSpecificWarnings', prefix='/wd') |
430 cl('StringPooling', map={'true': '/GF'}) | 430 cl('StringPooling', map={'true': '/GF'}) |
431 cl('EnableFiberSafeOptimizations', map={'true': '/GT'}) | 431 cl('EnableFiberSafeOptimizations', map={'true': '/GT'}) |
432 cl('OmitFramePointers', map={'false': '-', 'true': ''}, prefix='/Oy') | 432 cl('OmitFramePointers', map={'false': '-', 'true': ''}, prefix='/Oy') |
433 cl('EnableIntrinsicFunctions', map={'false': '-', 'true': ''}, prefix='/Oi') | 433 cl('EnableIntrinsicFunctions', map={'false': '-', 'true': ''}, prefix='/Oi') |
434 cl('FavorSizeOrSpeed', map={'1': 't', '2': 's'}, prefix='/O') | 434 cl('FavorSizeOrSpeed', map={'1': 't', '2': 's'}, prefix='/O') |
| 435 cl('FloatingPointModel', |
| 436 map={'0': 'precise', '1': 'strict', '2': 'fast'}, prefix='/fp:') |
435 cl('WholeProgramOptimization', map={'true': '/GL'}) | 437 cl('WholeProgramOptimization', map={'true': '/GL'}) |
436 cl('WarningLevel', prefix='/W') | 438 cl('WarningLevel', prefix='/W') |
437 cl('WarnAsError', map={'true': '/WX'}) | 439 cl('WarnAsError', map={'true': '/WX'}) |
438 cl('CallingConvention', | 440 cl('CallingConvention', |
439 map={'0': 'd', '1': 'r', '2': 'z'}, prefix='/G') | 441 map={'0': 'd', '1': 'r', '2': 'z'}, prefix='/G') |
440 cl('DebugInformationFormat', | 442 cl('DebugInformationFormat', |
441 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z') | 443 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z') |
442 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'}) | 444 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'}) |
443 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'}) | 445 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'}) |
444 cl('MinimalRebuild', map={'true': '/Gm'}) | 446 cl('MinimalRebuild', map={'true': '/Gm'}) |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 | 1052 |
1051 # To determine processor word size on Windows, in addition to checking | 1053 # To determine processor word size on Windows, in addition to checking |
1052 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 1054 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
1053 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 1055 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
1054 # contains the actual word size of the system when running thru WOW64). | 1056 # contains the actual word size of the system when running thru WOW64). |
1055 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 1057 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
1056 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 1058 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
1057 default_variables['MSVS_OS_BITS'] = 64 | 1059 default_variables['MSVS_OS_BITS'] = 64 |
1058 else: | 1060 else: |
1059 default_variables['MSVS_OS_BITS'] = 32 | 1061 default_variables['MSVS_OS_BITS'] = 32 |
OLD | NEW |