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

Side by Side Diff: pylib/gyp/MSVSUtil.py

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 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
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 """Utility functions shared amongst the Windows generators.""" 5 """Utility functions shared amongst the Windows generators."""
6 6
7 import copy 7 import copy
8 import os 8 import os
9 9
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 shim_target_name = target_name + '_' + shim_suffix 228 shim_target_name = target_name + '_' + shim_suffix
229 full_shim_target_name = _SuffixName(t, shim_suffix) 229 full_shim_target_name = _SuffixName(t, shim_suffix)
230 shim_dict = copy.deepcopy(base_dict) 230 shim_dict = copy.deepcopy(base_dict)
231 shim_dict['target_name'] = shim_target_name 231 shim_dict['target_name'] = shim_target_name
232 shim_dict['type'] = 'static_library' 232 shim_dict['type'] = 'static_library'
233 shim_dict['sources'] = [ shim_cc_path ] 233 shim_dict['sources'] = [ shim_cc_path ]
234 shim_dict['dependencies'] = [ full_copy_target_name ] 234 shim_dict['dependencies'] = [ full_copy_target_name ]
235 235
236 # Set up the shim to output its PDB to the same location as the final linker 236 # Set up the shim to output its PDB to the same location as the final linker
237 # target. 237 # target.
238 for config_name, config in shim_dict.get('configurations').iteritems(): 238 for config_name, config in shim_dict.get('configurations').items():
239 pdb_path = _GetPdbPath(target_dict, config_name, vars) 239 pdb_path = _GetPdbPath(target_dict, config_name, vars)
240 240
241 # A few keys that we don't want to propagate. 241 # A few keys that we don't want to propagate.
242 for key in ['msvs_precompiled_header', 'msvs_precompiled_source', 'test']: 242 for key in ['msvs_precompiled_header', 'msvs_precompiled_source', 'test']:
243 config.pop(key, None) 243 config.pop(key, None)
244 244
245 msvs = config.setdefault('msvs_settings', {}) 245 msvs = config.setdefault('msvs_settings', {})
246 246
247 # Update the compiler directives in the shim target. 247 # Update the compiler directives in the shim target.
248 compiler = msvs.setdefault('VCCLCompilerTool', {}) 248 compiler = msvs.setdefault('VCCLCompilerTool', {})
(...skipping 12 matching lines...) Expand all
261 # the dependency generation works as expected in ninja. 261 # the dependency generation works as expected in ninja.
262 target_list.insert(0, full_copy_target_name) 262 target_list.insert(0, full_copy_target_name)
263 target_list.insert(0, full_shim_target_name) 263 target_list.insert(0, full_shim_target_name)
264 target_dicts[full_copy_target_name] = copy_dict 264 target_dicts[full_copy_target_name] = copy_dict
265 target_dicts[full_shim_target_name] = shim_dict 265 target_dicts[full_shim_target_name] = shim_dict
266 266
267 # Update the original target to depend on the shim target. 267 # Update the original target to depend on the shim target.
268 target_dict.setdefault('dependencies', []).append(full_shim_target_name) 268 target_dict.setdefault('dependencies', []).append(full_shim_target_name)
269 269
270 return (target_list, target_dicts) 270 return (target_list, target_dicts)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698