Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2013 Google Inc. All rights reserved. | 1 # Copyright (c) 2013 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 import collections | 5 import collections |
| 6 import copy | 6 import copy |
| 7 import hashlib | 7 import hashlib |
| 8 import json | 8 import json |
| 9 import multiprocessing | 9 import multiprocessing |
| 10 import os.path | 10 import os.path |
| 11 import re | 11 import re |
| 12 import signal | 12 import signal |
| 13 import subprocess | 13 import subprocess |
| 14 import sys | 14 import sys |
| 15 import gyp | 15 import gyp |
| 16 import gyp.common | 16 import gyp.common |
| 17 from gyp.common import OrderedSet | |
| 17 import gyp.msvs_emulation | 18 import gyp.msvs_emulation |
| 18 import gyp.MSVSUtil as MSVSUtil | 19 import gyp.MSVSUtil as MSVSUtil |
| 19 import gyp.xcode_emulation | 20 import gyp.xcode_emulation |
| 20 from cStringIO import StringIO | 21 from cStringIO import StringIO |
| 21 | 22 |
| 22 from gyp.common import GetEnvironFallback | 23 from gyp.common import GetEnvironFallback |
| 23 import gyp.ninja_syntax as ninja_syntax | 24 import gyp.ninja_syntax as ninja_syntax |
| 24 | 25 |
| 25 generator_default_variables = { | 26 generator_default_variables = { |
| 26 'EXECUTABLE_PREFIX': '', | 27 'EXECUTABLE_PREFIX': '', |
| (...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1770 wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value) | 1771 wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value) |
| 1771 | 1772 |
| 1772 # Support wrappers from environment variables too. | 1773 # Support wrappers from environment variables too. |
| 1773 for key, value in os.environ.iteritems(): | 1774 for key, value in os.environ.iteritems(): |
| 1774 if key.lower().endswith('_wrapper'): | 1775 if key.lower().endswith('_wrapper'): |
| 1775 key_prefix = key[:-len('_wrapper')] | 1776 key_prefix = key[:-len('_wrapper')] |
| 1776 key_prefix = re.sub(r'\.HOST$', '.host', key_prefix) | 1777 key_prefix = re.sub(r'\.HOST$', '.host', key_prefix) |
| 1777 wrappers[key_prefix] = os.path.join(build_to_root, value) | 1778 wrappers[key_prefix] = os.path.join(build_to_root, value) |
| 1778 | 1779 |
| 1779 if flavor == 'win': | 1780 if flavor == 'win': |
| 1781 configs = [target_dicts[qualified_target]['configurations'][config_name] | |
| 1782 for qualified_target in target_list] | |
| 1783 shared_system_includes = None | |
| 1784 if not generator_flags.get('ninja_use_custom_environment_files', 0): | |
|
scottmg
2014/07/20 05:18:10
Does this mean this isn't going to work with goma
Nico
2014/07/20 05:51:02
...uhrr? No idea! http://build.chromium.org/p/chro
| |
| 1785 shared_system_includes = \ | |
| 1786 gyp.msvs_emulation.ExtractSharedMSVSSystemIncludes( | |
| 1787 configs, generator_flags) | |
| 1780 cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles( | 1788 cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles( |
| 1781 toplevel_build, generator_flags, OpenOutput) | 1789 toplevel_build, generator_flags, shared_system_includes, OpenOutput) |
| 1782 for arch, path in cl_paths.iteritems(): | 1790 for arch, path in cl_paths.iteritems(): |
| 1783 if clang_cl: | 1791 if clang_cl: |
| 1784 # If we have selected clang-cl, use that instead. | 1792 # If we have selected clang-cl, use that instead. |
| 1785 path = clang_cl | 1793 path = clang_cl |
| 1786 command = CommandWithWrapper('CC', wrappers, | 1794 command = CommandWithWrapper('CC', wrappers, |
| 1787 QuoteShellArgument(path, 'win')) | 1795 QuoteShellArgument(path, 'win')) |
| 1788 if clang_cl: | 1796 if clang_cl: |
| 1789 # Use clang-cl to cross-compile for x86 or x86_64. | 1797 # Use clang-cl to cross-compile for x86 or x86_64. |
| 1790 command += (' -m32' if arch == 'x86' else ' -m64') | 1798 command += (' -m32' if arch == 'x86' else ' -m64') |
| 1791 master_ninja.variable('cl_' + arch, command) | 1799 master_ninja.variable('cl_' + arch, command) |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2220 arglists.append( | 2228 arglists.append( |
| 2221 (target_list, target_dicts, data, params, config_name)) | 2229 (target_list, target_dicts, data, params, config_name)) |
| 2222 pool.map(CallGenerateOutputForConfig, arglists) | 2230 pool.map(CallGenerateOutputForConfig, arglists) |
| 2223 except KeyboardInterrupt, e: | 2231 except KeyboardInterrupt, e: |
| 2224 pool.terminate() | 2232 pool.terminate() |
| 2225 raise e | 2233 raise e |
| 2226 else: | 2234 else: |
| 2227 for config_name in config_names: | 2235 for config_name in config_names: |
| 2228 GenerateOutputForConfig(target_list, target_dicts, data, params, | 2236 GenerateOutputForConfig(target_list, target_dicts, data, params, |
| 2229 config_name) | 2237 config_name) |
| OLD | NEW |