Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: pylib/gyp/generator/ninja.py

Issue 406523005: ninja/win: Put common msvs_system_include_dirs into %INCLUDE% (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pylib/gyp/msvs_emulation.py » ('j') | pylib/gyp/msvs_emulation.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1770 wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value) 1770 wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value)
1771 1771
1772 # Support wrappers from environment variables too. 1772 # Support wrappers from environment variables too.
1773 for key, value in os.environ.iteritems(): 1773 for key, value in os.environ.iteritems():
1774 if key.lower().endswith('_wrapper'): 1774 if key.lower().endswith('_wrapper'):
1775 key_prefix = key[:-len('_wrapper')] 1775 key_prefix = key[:-len('_wrapper')]
1776 key_prefix = re.sub(r'\.HOST$', '.host', key_prefix) 1776 key_prefix = re.sub(r'\.HOST$', '.host', key_prefix)
1777 wrappers[key_prefix] = os.path.join(build_to_root, value) 1777 wrappers[key_prefix] = os.path.join(build_to_root, value)
1778 1778
1779 if flavor == 'win': 1779 if flavor == 'win':
1780 # Extract msvs_system_include_dirs that are common to all targets.
1781 all_system_includes = set(
1782 target_dicts[target_list[0]]['configurations'][config_name].get(
1783 'msvs_system_include_dirs', []))
1784 for qualified_target in target_list:
scottmg 2014/07/19 18:49:36 is this target_list everything? how does it relate
Nico 2014/07/19 23:05:35 as far as I understand, all_targets gets everythin
1785 config = target_dicts[qualified_target]['configurations'][config_name]
1786 system_includes = config.get('msvs_system_include_dirs', [])
1787 all_system_includes = all_system_includes & set(system_includes)
1788 #print 'env:', all_system_includes
1789 if all_system_includes:
1790 for qualified_target in target_list:
1791 config = target_dicts[qualified_target]['configurations'][config_name]
1792 includes = config.get('msvs_system_include_dirs', [])
1793 if includes:
1794 new_includes = [i for i in includes if i not in all_system_includes]
1795 config['msvs_system_include_dirs'] = new_includes
1796 # FIXME: Need to expand ms macros in all_system_includes too
1797
1780 cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles( 1798 cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles(
1781 toplevel_build, generator_flags, OpenOutput) 1799 toplevel_build, generator_flags, all_system_includes, OpenOutput)
1782 for arch, path in cl_paths.iteritems(): 1800 for arch, path in cl_paths.iteritems():
1783 if clang_cl: 1801 if clang_cl:
1784 # If we have selected clang-cl, use that instead. 1802 # If we have selected clang-cl, use that instead.
1785 path = clang_cl 1803 path = clang_cl
1786 command = CommandWithWrapper('CC', wrappers, 1804 command = CommandWithWrapper('CC', wrappers,
1787 QuoteShellArgument(path, 'win')) 1805 QuoteShellArgument(path, 'win'))
1788 if clang_cl: 1806 if clang_cl:
1789 # Use clang-cl to cross-compile for x86 or x86_64. 1807 # Use clang-cl to cross-compile for x86 or x86_64.
1790 command += (' -m32' if arch == 'x86' else ' -m64') 1808 command += (' -m32' if arch == 'x86' else ' -m64')
1791 master_ninja.variable('cl_' + arch, command) 1809 master_ninja.variable('cl_' + arch, command)
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2220 arglists.append( 2238 arglists.append(
2221 (target_list, target_dicts, data, params, config_name)) 2239 (target_list, target_dicts, data, params, config_name))
2222 pool.map(CallGenerateOutputForConfig, arglists) 2240 pool.map(CallGenerateOutputForConfig, arglists)
2223 except KeyboardInterrupt, e: 2241 except KeyboardInterrupt, e:
2224 pool.terminate() 2242 pool.terminate()
2225 raise e 2243 raise e
2226 else: 2244 else:
2227 for config_name in config_names: 2245 for config_name in config_names:
2228 GenerateOutputForConfig(target_list, target_dicts, data, params, 2246 GenerateOutputForConfig(target_list, target_dicts, data, params,
2229 config_name) 2247 config_name)
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/msvs_emulation.py » ('j') | pylib/gyp/msvs_emulation.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698