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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 cl('InlineFunctionExpansion', prefix='/Ob') | 435 cl('InlineFunctionExpansion', prefix='/Ob') |
436 cl('DisableSpecificWarnings', prefix='/wd') | 436 cl('DisableSpecificWarnings', prefix='/wd') |
437 cl('StringPooling', map={'true': '/GF'}) | 437 cl('StringPooling', map={'true': '/GF'}) |
438 cl('EnableFiberSafeOptimizations', map={'true': '/GT'}) | 438 cl('EnableFiberSafeOptimizations', map={'true': '/GT'}) |
439 cl('OmitFramePointers', map={'false': '-', 'true': ''}, prefix='/Oy') | 439 cl('OmitFramePointers', map={'false': '-', 'true': ''}, prefix='/Oy') |
440 cl('EnableIntrinsicFunctions', map={'false': '-', 'true': ''}, prefix='/Oi') | 440 cl('EnableIntrinsicFunctions', map={'false': '-', 'true': ''}, prefix='/Oi') |
441 cl('FavorSizeOrSpeed', map={'1': 't', '2': 's'}, prefix='/O') | 441 cl('FavorSizeOrSpeed', map={'1': 't', '2': 's'}, prefix='/O') |
442 cl('FloatingPointModel', | 442 cl('FloatingPointModel', |
443 map={'0': 'precise', '1': 'strict', '2': 'fast'}, prefix='/fp:', | 443 map={'0': 'precise', '1': 'strict', '2': 'fast'}, prefix='/fp:', |
444 default='0') | 444 default='0') |
| 445 cl('CompileAsManaged', map={'false': '', 'true': '/clr'}) |
445 cl('WholeProgramOptimization', map={'true': '/GL'}) | 446 cl('WholeProgramOptimization', map={'true': '/GL'}) |
446 cl('WarningLevel', prefix='/W') | 447 cl('WarningLevel', prefix='/W') |
447 cl('WarnAsError', map={'true': '/WX'}) | 448 cl('WarnAsError', map={'true': '/WX'}) |
448 cl('CallingConvention', | 449 cl('CallingConvention', |
449 map={'0': 'd', '1': 'r', '2': 'z', '3': 'v'}, prefix='/G') | 450 map={'0': 'd', '1': 'r', '2': 'z', '3': 'v'}, prefix='/G') |
450 cl('DebugInformationFormat', | 451 cl('DebugInformationFormat', |
451 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z') | 452 map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z') |
452 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'}) | 453 cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'}) |
453 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'}) | 454 cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'}) |
454 cl('MinimalRebuild', map={'true': '/Gm'}) | 455 cl('MinimalRebuild', map={'true': '/Gm'}) |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 | 1078 |
1078 # To determine processor word size on Windows, in addition to checking | 1079 # To determine processor word size on Windows, in addition to checking |
1079 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 1080 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
1080 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 1081 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
1081 # contains the actual word size of the system when running thru WOW64). | 1082 # contains the actual word size of the system when running thru WOW64). |
1082 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 1083 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
1083 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 1084 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
1084 default_variables['MSVS_OS_BITS'] = 64 | 1085 default_variables['MSVS_OS_BITS'] = 64 |
1085 else: | 1086 else: |
1086 default_variables['MSVS_OS_BITS'] = 32 | 1087 default_variables['MSVS_OS_BITS'] = 32 |
OLD | NEW |