Chromium Code Reviews| Index: pylib/gyp/msvs_emulation.py |
| diff --git a/pylib/gyp/msvs_emulation.py b/pylib/gyp/msvs_emulation.py |
| index 3c9fe50a0b0c8dc2614c4ef9d5433782f2aa6a63..7d12367fb101c66ba508523841bbc9e2fd2bc914 100644 |
| --- a/pylib/gyp/msvs_emulation.py |
| +++ b/pylib/gyp/msvs_emulation.py |
| @@ -848,3 +848,22 @@ def VerifyMissingSources(sources, build_dir, generator_flags, gyp_to_ninja): |
| # path for a slightly less crazy looking output. |
| cleaned_up = [os.path.normpath(x) for x in missing] |
| raise Exception('Missing input files:\n%s' % '\n'.join(cleaned_up)) |
| + |
| +# Sets some values in default_variables, which are required for many |
| +# generators, run on Windows. |
| +def CalculateCommonVariables(default_variables, params): |
| + generator_flags = params.get('generator_flags', {}) |
|
scottmg
2013/10/02 16:57:42
2-space indent
Slava Chigrin
2013/10/03 07:32:28
Done.
|
| + |
| + # Set a variable so conditions can be based on msvs_version. |
| + msvs_version = gyp.msvs_emulation.GetVSVersion(generator_flags) |
| + default_variables['MSVS_VERSION'] = msvs_version.ShortName() |
| + |
| + # To determine processor word size on Windows, in addition to checking |
| + # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
| + # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
| + # contains the actual word size of the system when running thru WOW64). |
| + if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
| + '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
| + default_variables['MSVS_OS_BITS'] = 64 |
| + else: |
| + default_variables['MSVS_OS_BITS'] = 32 |