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

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

Issue 790213007: msvs/ninja win: Fix support for ImageHasSafeExceptionHandlers (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
« 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) 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 r"""Code to validate and convert settings of the Microsoft build tools. 5 r"""Code to validate and convert settings of the Microsoft build tools.
6 6
7 This file contains code to validate and convert settings of the Microsoft 7 This file contains code to validate and convert settings of the Microsoft
8 build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(), 8 build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(),
9 and ValidateMSBuildSettings() are the entry points. 9 and ValidateMSBuildSettings() are the entry points.
10 10
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 308
309 def _MSBuildOnly(tool, name, setting_type): 309 def _MSBuildOnly(tool, name, setting_type):
310 """Defines a setting that is only found in MSBuild. 310 """Defines a setting that is only found in MSBuild.
311 311
312 Args: 312 Args:
313 tool: a dictionary that gives the names of the tool for MSVS and MSBuild. 313 tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
314 name: the name of the setting. 314 name: the name of the setting.
315 setting_type: the type of this setting. 315 setting_type: the type of this setting.
316 """ 316 """
317
318 def _Translate(value, msbuild_settings):
319 # Let msbuild-only properties get translated as-is from msvs_settings.
320 tool_settings = msbuild_settings.setdefault(tool.msbuild_name, {})
321 tool_settings[name] = value
322
317 _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild 323 _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild
324 _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
318 325
319 326
320 def _ConvertedToAdditionalOption(tool, msvs_name, flag): 327 def _ConvertedToAdditionalOption(tool, msvs_name, flag):
321 """Defines a setting that's handled via a command line option in MSBuild. 328 """Defines a setting that's handled via a command line option in MSBuild.
322 329
323 Args: 330 Args:
324 tool: a dictionary that gives the names of the tool for MSVS and MSBuild. 331 tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
325 msvs_name: the name of the MSVS setting that if 'true' becomes a flag 332 msvs_name: the name of the MSVS setting that if 'true' becomes a flag
326 flag: the flag to insert at the end of the AdditionalOptions 333 flag: the flag to insert at the end of the AdditionalOptions
327 """ 334 """
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 _MSVSOnly(_manifest, 'UseUnicodeResponseFiles', _boolean) 1077 _MSVSOnly(_manifest, 'UseUnicodeResponseFiles', _boolean)
1071 1078
1072 # MSBuild options not found in MSVS. 1079 # MSBuild options not found in MSVS.
1073 _MSBuildOnly(_manifest, 'EnableDPIAwareness', _boolean) 1080 _MSBuildOnly(_manifest, 'EnableDPIAwareness', _boolean)
1074 _MSBuildOnly(_manifest, 'GenerateCategoryTags', _boolean) # /category 1081 _MSBuildOnly(_manifest, 'GenerateCategoryTags', _boolean) # /category
1075 _MSBuildOnly(_manifest, 'ManifestFromManagedAssembly', 1082 _MSBuildOnly(_manifest, 'ManifestFromManagedAssembly',
1076 _file_name) # /managedassemblyname 1083 _file_name) # /managedassemblyname
1077 _MSBuildOnly(_manifest, 'OutputResourceManifests', _string) # /outputresource 1084 _MSBuildOnly(_manifest, 'OutputResourceManifests', _string) # /outputresource
1078 _MSBuildOnly(_manifest, 'SuppressDependencyElement', _boolean) # /nodependency 1085 _MSBuildOnly(_manifest, 'SuppressDependencyElement', _boolean) # /nodependency
1079 _MSBuildOnly(_manifest, 'TrackerLogDirectory', _folder_name) 1086 _MSBuildOnly(_manifest, 'TrackerLogDirectory', _folder_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