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
|
---|
3 | # found in the LICENSE file.
|
---|
4 |
|
---|
5 | r"""Code to validate and convert settings of the Microsoft build tools.
|
---|
6 |
|
---|
7 | This file contains code to validate and convert settings of the Microsoft
|
---|
8 | build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(),
|
---|
9 | and ValidateMSBuildSettings() are the entry points.
|
---|
10 |
|
---|
11 | This file was created by comparing the projects created by Visual Studio 2008
|
---|
12 | and Visual Studio 2010 for all available settings through the user interface.
|
---|
13 | The MSBuild schemas were also considered. They are typically found in the
|
---|
14 | MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild
|
---|
15 | """
|
---|
16 |
|
---|
17 | from __future__ import print_function
|
---|
18 |
|
---|
19 | from gyp import string_types
|
---|
20 |
|
---|
21 | import sys
|
---|
22 | import re
|
---|
23 |
|
---|
24 | # Dictionaries of settings validators. The key is the tool name, the value is
|
---|
25 | # a dictionary mapping setting names to validation functions.
|
---|
26 | _msvs_validators = {}
|
---|
27 | _msbuild_validators = {}
|
---|
28 |
|
---|
29 |
|
---|
30 | # A dictionary of settings converters. The key is the tool name, the value is
|
---|
31 | # a dictionary mapping setting names to conversion functions.
|
---|
32 | _msvs_to_msbuild_converters = {}
|
---|
33 |
|
---|
34 |
|
---|
35 | # Tool name mapping from MSVS to MSBuild.
|
---|
36 | _msbuild_name_of_tool = {}
|
---|
37 |
|
---|
38 |
|
---|
39 | class _Tool(object):
|
---|
40 | """Represents a tool used by MSVS or MSBuild.
|
---|
41 |
|
---|
42 | Attributes:
|
---|
43 | msvs_name: The name of the tool in MSVS.
|
---|
44 | msbuild_name: The name of the tool in MSBuild.
|
---|
45 | """
|
---|
46 |
|
---|
47 | def __init__(self, msvs_name, msbuild_name):
|
---|
48 | self.msvs_name = msvs_name
|
---|
49 | self.msbuild_name = msbuild_name
|
---|
50 |
|
---|
51 |
|
---|
52 | def _AddTool(tool):
|
---|
53 | """Adds a tool to the four dictionaries used to process settings.
|
---|
54 |
|
---|
55 | This only defines the tool. Each setting also needs to be added.
|
---|
56 |
|
---|
57 | Args:
|
---|
58 | tool: The _Tool object to be added.
|
---|
59 | """
|
---|
60 | _msvs_validators[tool.msvs_name] = {}
|
---|
61 | _msbuild_validators[tool.msbuild_name] = {}
|
---|
62 | _msvs_to_msbuild_converters[tool.msvs_name] = {}
|
---|
63 | _msbuild_name_of_tool[tool.msvs_name] = tool.msbuild_name
|
---|
64 |
|
---|
65 |
|
---|
66 | def _GetMSBuildToolSettings(msbuild_settings, tool):
|
---|
67 | """Returns an MSBuild tool dictionary. Creates it if needed."""
|
---|
68 | return msbuild_settings.setdefault(tool.msbuild_name, {})
|
---|
69 |
|
---|
70 |
|
---|
71 | class _Type(object):
|
---|
72 | """Type of settings (Base class)."""
|
---|
73 |
|
---|
74 | def ValidateMSVS(self, value):
|
---|
75 | """Verifies that the value is legal for MSVS.
|
---|
76 |
|
---|
77 | Args:
|
---|
78 | value: the value to check for this type.
|
---|
79 |
|
---|
80 | Raises:
|
---|
81 | ValueError if value is not valid for MSVS.
|
---|
82 | """
|
---|
83 |
|
---|
84 | def ValidateMSBuild(self, value):
|
---|
85 | """Verifies that the value is legal for MSBuild.
|
---|
86 |
|
---|
87 | Args:
|
---|
88 | value: the value to check for this type.
|
---|
89 |
|
---|
90 | Raises:
|
---|
91 | ValueError if value is not valid for MSBuild.
|
---|
92 | """
|
---|
93 |
|
---|
94 | def ConvertToMSBuild(self, value):
|
---|
95 | """Returns the MSBuild equivalent of the MSVS value given.
|
---|
96 |
|
---|
97 | Args:
|
---|
98 | value: the MSVS value to convert.
|
---|
99 |
|
---|
100 | Returns:
|
---|
101 | the MSBuild equivalent.
|
---|
102 |
|
---|
103 | Raises:
|
---|
104 | ValueError if value is not valid.
|
---|
105 | """
|
---|
106 | return value
|
---|
107 |
|
---|
108 |
|
---|
109 | class _String(_Type):
|
---|
110 | """A setting that's just a string."""
|
---|
111 |
|
---|
112 | def ValidateMSVS(self, value):
|
---|
113 | if not isinstance(value, string_types):
|
---|
114 | raise ValueError("expected string; got %r" % value)
|
---|
115 |
|
---|
116 | def ValidateMSBuild(self, value):
|
---|
117 | if not isinstance(value, string_types):
|
---|
118 | raise ValueError("expected string; got %r" % value)
|
---|
119 |
|
---|
120 | def ConvertToMSBuild(self, value):
|
---|
121 | # Convert the macros
|
---|
122 | return ConvertVCMacrosToMSBuild(value)
|
---|
123 |
|
---|
124 |
|
---|
125 | class _StringList(_Type):
|
---|
126 | """A settings that's a list of strings."""
|
---|
127 |
|
---|
128 | def ValidateMSVS(self, value):
|
---|
129 | if not isinstance(value, string_types) and not isinstance(value, list):
|
---|
130 | raise ValueError("expected string list; got %r" % value)
|
---|
131 |
|
---|
132 | def ValidateMSBuild(self, value):
|
---|
133 | if not isinstance(value, string_types) and not isinstance(value, list):
|
---|
134 | raise ValueError("expected string list; got %r" % value)
|
---|
135 |
|
---|
136 | def ConvertToMSBuild(self, value):
|
---|
137 | # Convert the macros
|
---|
138 | if isinstance(value, list):
|
---|
139 | return [ConvertVCMacrosToMSBuild(i) for i in value]
|
---|
140 | else:
|
---|
141 | return ConvertVCMacrosToMSBuild(value)
|
---|
142 |
|
---|
143 |
|
---|
144 | class _Boolean(_Type):
|
---|
145 | """Boolean settings, can have the values 'false' or 'true'."""
|
---|
146 |
|
---|
147 | def _Validate(self, value):
|
---|
148 | if value != "true" and value != "false":
|
---|
149 | raise ValueError("expected bool; got %r" % value)
|
---|
150 |
|
---|
151 | def ValidateMSVS(self, value):
|
---|
152 | self._Validate(value)
|
---|
153 |
|
---|
154 | def ValidateMSBuild(self, value):
|
---|
155 | self._Validate(value)
|
---|
156 |
|
---|
157 | def ConvertToMSBuild(self, value):
|
---|
158 | self._Validate(value)
|
---|
159 | return value
|
---|
160 |
|
---|
161 |
|
---|
162 | class _Integer(_Type):
|
---|
163 | """Integer settings."""
|
---|
164 |
|
---|
165 | def __init__(self, msbuild_base=10):
|
---|
166 | _Type.__init__(self)
|
---|
167 | self._msbuild_base = msbuild_base
|
---|
168 |
|
---|
169 | def ValidateMSVS(self, value):
|
---|
170 | # Try to convert, this will raise ValueError if invalid.
|
---|
171 | self.ConvertToMSBuild(value)
|
---|
172 |
|
---|
173 | def ValidateMSBuild(self, value):
|
---|
174 | # Try to convert, this will raise ValueError if invalid.
|
---|
175 | int(value, self._msbuild_base)
|
---|
176 |
|
---|
177 | def ConvertToMSBuild(self, value):
|
---|
178 | msbuild_format = (self._msbuild_base == 10) and "%d" or "0x%04x"
|
---|
179 | return msbuild_format % int(value)
|
---|
180 |
|
---|
181 |
|
---|
182 | class _Enumeration(_Type):
|
---|
183 | """Type of settings that is an enumeration.
|
---|
184 |
|
---|
185 | In MSVS, the values are indexes like '0', '1', and '2'.
|
---|
186 | MSBuild uses text labels that are more representative, like 'Win32'.
|
---|
187 |
|
---|
188 | Constructor args:
|
---|
189 | label_list: an array of MSBuild labels that correspond to the MSVS index.
|
---|
190 | In the rare cases where MSVS has skipped an index value, None is
|
---|
191 | used in the array to indicate the unused spot.
|
---|
192 | new: an array of labels that are new to MSBuild.
|
---|
193 | """
|
---|
194 |
|
---|
195 | def __init__(self, label_list, new=None):
|
---|
196 | _Type.__init__(self)
|
---|
197 | self._label_list = label_list
|
---|
198 | self._msbuild_values = set(value for value in label_list if value is not None)
|
---|
199 | if new is not None:
|
---|
200 | self._msbuild_values.update(new)
|
---|
201 |
|
---|
202 | def ValidateMSVS(self, value):
|
---|
203 | # Try to convert. It will raise an exception if not valid.
|
---|
204 | self.ConvertToMSBuild(value)
|
---|
205 |
|
---|
206 | def ValidateMSBuild(self, value):
|
---|
207 | if value not in self._msbuild_values:
|
---|
208 | raise ValueError("unrecognized enumerated value %s" % value)
|
---|
209 |
|
---|
210 | def ConvertToMSBuild(self, value):
|
---|
211 | index = int(value)
|
---|
212 | if index < 0 or index >= len(self._label_list):
|
---|
213 | raise ValueError(
|
---|
214 | "index value (%d) not in expected range [0, %d)"
|
---|
215 | % (index, len(self._label_list))
|
---|
216 | )
|
---|
217 | label = self._label_list[index]
|
---|
218 | if label is None:
|
---|
219 | raise ValueError("converted value for %s not specified." % value)
|
---|
220 | return label
|
---|
221 |
|
---|
222 |
|
---|
223 | # Instantiate the various generic types.
|
---|
224 | _boolean = _Boolean()
|
---|
225 | _integer = _Integer()
|
---|
226 | # For now, we don't do any special validation on these types:
|
---|
227 | _string = _String()
|
---|
228 | _file_name = _String()
|
---|
229 | _folder_name = _String()
|
---|
230 | _file_list = _StringList()
|
---|
231 | _folder_list = _StringList()
|
---|
232 | _string_list = _StringList()
|
---|
233 | # Some boolean settings went from numerical values to boolean. The
|
---|
234 | # mapping is 0: default, 1: false, 2: true.
|
---|
235 | _newly_boolean = _Enumeration(["", "false", "true"])
|
---|
236 |
|
---|
237 |
|
---|
238 | def _Same(tool, name, setting_type):
|
---|
239 | """Defines a setting that has the same name in MSVS and MSBuild.
|
---|
240 |
|
---|
241 | Args:
|
---|
242 | tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
|
---|
243 | name: the name of the setting.
|
---|
244 | setting_type: the type of this setting.
|
---|
245 | """
|
---|
246 | _Renamed(tool, name, name, setting_type)
|
---|
247 |
|
---|
248 |
|
---|
249 | def _Renamed(tool, msvs_name, msbuild_name, setting_type):
|
---|
250 | """Defines a setting for which the name has changed.
|
---|
251 |
|
---|
252 | Args:
|
---|
253 | tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
|
---|
254 | msvs_name: the name of the MSVS setting.
|
---|
255 | msbuild_name: the name of the MSBuild setting.
|
---|
256 | setting_type: the type of this setting.
|
---|
257 | """
|
---|
258 |
|
---|
259 | def _Translate(value, msbuild_settings):
|
---|
260 | msbuild_tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
|
---|
261 | msbuild_tool_settings[msbuild_name] = setting_type.ConvertToMSBuild(value)
|
---|
262 |
|
---|
263 | _msvs_validators[tool.msvs_name][msvs_name] = setting_type.ValidateMSVS
|
---|
264 | _msbuild_validators[tool.msbuild_name][msbuild_name] = setting_type.ValidateMSBuild
|
---|
265 | _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
|
---|
266 |
|
---|
267 |
|
---|
268 | def _Moved(tool, settings_name, msbuild_tool_name, setting_type):
|
---|
269 | _MovedAndRenamed(
|
---|
270 | tool, settings_name, msbuild_tool_name, settings_name, setting_type
|
---|
271 | )
|
---|
272 |
|
---|
273 |
|
---|
274 | def _MovedAndRenamed(
|
---|
275 | tool, msvs_settings_name, msbuild_tool_name, msbuild_settings_name, setting_type
|
---|
276 | ):
|
---|
277 | """Defines a setting that may have moved to a new section.
|
---|
278 |
|
---|
279 | Args:
|
---|
280 | tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
|
---|
281 | msvs_settings_name: the MSVS name of the setting.
|
---|
282 | msbuild_tool_name: the name of the MSBuild tool to place the setting under.
|
---|
283 | msbuild_settings_name: the MSBuild name of the setting.
|
---|
284 | setting_type: the type of this setting.
|
---|
285 | """
|
---|
286 |
|
---|
287 | def _Translate(value, msbuild_settings):
|
---|
288 | tool_settings = msbuild_settings.setdefault(msbuild_tool_name, {})
|
---|
289 | tool_settings[msbuild_settings_name] = setting_type.ConvertToMSBuild(value)
|
---|
290 |
|
---|
291 | _msvs_validators[tool.msvs_name][msvs_settings_name] = setting_type.ValidateMSVS
|
---|
292 | validator = setting_type.ValidateMSBuild
|
---|
293 | _msbuild_validators[msbuild_tool_name][msbuild_settings_name] = validator
|
---|
294 | _msvs_to_msbuild_converters[tool.msvs_name][msvs_settings_name] = _Translate
|
---|
295 |
|
---|
296 |
|
---|
297 | def _MSVSOnly(tool, name, setting_type):
|
---|
298 | """Defines a setting that is only found in MSVS.
|
---|
299 |
|
---|
300 | Args:
|
---|
301 | tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
|
---|
302 | name: the name of the setting.
|
---|
303 | setting_type: the type of this setting.
|
---|
304 | """
|
---|
305 |
|
---|
306 | def _Translate(unused_value, unused_msbuild_settings):
|
---|
307 | # Since this is for MSVS only settings, no translation will happen.
|
---|
308 | pass
|
---|
309 |
|
---|
310 | _msvs_validators[tool.msvs_name][name] = setting_type.ValidateMSVS
|
---|
311 | _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
|
---|
312 |
|
---|
313 |
|
---|
314 | def _MSBuildOnly(tool, name, setting_type):
|
---|
315 | """Defines a setting that is only found in MSBuild.
|
---|
316 |
|
---|
317 | Args:
|
---|
318 | tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
|
---|
319 | name: the name of the setting.
|
---|
320 | setting_type: the type of this setting.
|
---|
321 | """
|
---|
322 |
|
---|
323 | def _Translate(value, msbuild_settings):
|
---|
324 | # Let msbuild-only properties get translated as-is from msvs_settings.
|
---|
325 | tool_settings = msbuild_settings.setdefault(tool.msbuild_name, {})
|
---|
326 | tool_settings[name] = value
|
---|
327 |
|
---|
328 | _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild
|
---|
329 | _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
|
---|
330 |
|
---|
331 |
|
---|
332 | def _ConvertedToAdditionalOption(tool, msvs_name, flag):
|
---|
333 | """Defines a setting that's handled via a command line option in MSBuild.
|
---|
334 |
|
---|
335 | Args:
|
---|
336 | tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
|
---|
337 | msvs_name: the name of the MSVS setting that if 'true' becomes a flag
|
---|
338 | flag: the flag to insert at the end of the AdditionalOptions
|
---|
339 | """
|
---|
340 |
|
---|
341 | def _Translate(value, msbuild_settings):
|
---|
342 | if value == "true":
|
---|
343 | tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
|
---|
344 | if "AdditionalOptions" in tool_settings:
|
---|
345 | new_flags = "%s %s" % (tool_settings["AdditionalOptions"], flag)
|
---|
346 | else:
|
---|
347 | new_flags = flag
|
---|
348 | tool_settings["AdditionalOptions"] = new_flags
|
---|
349 |
|
---|
350 | _msvs_validators[tool.msvs_name][msvs_name] = _boolean.ValidateMSVS
|
---|
351 | _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
|
---|
352 |
|
---|
353 |
|
---|
354 | def _CustomGeneratePreprocessedFile(tool, msvs_name):
|
---|
355 | def _Translate(value, msbuild_settings):
|
---|
356 | tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
|
---|
357 | if value == "0":
|
---|
358 | tool_settings["PreprocessToFile"] = "false"
|
---|
359 | tool_settings["PreprocessSuppressLineNumbers"] = "false"
|
---|
360 | elif value == "1": # /P
|
---|
361 | tool_settings["PreprocessToFile"] = "true"
|
---|
362 | tool_settings["PreprocessSuppressLineNumbers"] = "false"
|
---|
363 | elif value == "2": # /EP /P
|
---|
364 | tool_settings["PreprocessToFile"] = "true"
|
---|
365 | tool_settings["PreprocessSuppressLineNumbers"] = "true"
|
---|
366 | else:
|
---|
367 | raise ValueError("value must be one of [0, 1, 2]; got %s" % value)
|
---|
368 |
|
---|
369 | # Create a bogus validator that looks for '0', '1', or '2'
|
---|
370 | msvs_validator = _Enumeration(["a", "b", "c"]).ValidateMSVS
|
---|
371 | _msvs_validators[tool.msvs_name][msvs_name] = msvs_validator
|
---|
372 | msbuild_validator = _boolean.ValidateMSBuild
|
---|
373 | msbuild_tool_validators = _msbuild_validators[tool.msbuild_name]
|
---|
374 | msbuild_tool_validators["PreprocessToFile"] = msbuild_validator
|
---|
375 | msbuild_tool_validators["PreprocessSuppressLineNumbers"] = msbuild_validator
|
---|
376 | _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
|
---|
377 |
|
---|
378 |
|
---|
379 | fix_vc_macro_slashes_regex_list = ("IntDir", "OutDir")
|
---|
380 | fix_vc_macro_slashes_regex = re.compile(
|
---|
381 | r"(\$\((?:%s)\))(?:[\\/]+)" % "|".join(fix_vc_macro_slashes_regex_list)
|
---|
382 | )
|
---|
383 |
|
---|
384 | # Regular expression to detect keys that were generated by exclusion lists
|
---|
385 | _EXCLUDED_SUFFIX_RE = re.compile("^(.*)_excluded$")
|
---|
386 |
|
---|
387 |
|
---|
388 | def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr):
|
---|
389 | """Verify that 'setting' is valid if it is generated from an exclusion list.
|
---|
390 |
|
---|
391 | If the setting appears to be generated from an exclusion list, the root name
|
---|
392 | is checked.
|
---|
393 |
|
---|
394 | Args:
|
---|
395 | setting: A string that is the setting name to validate
|
---|
396 | settings: A dictionary where the keys are valid settings
|
---|
397 | error_msg: The message to emit in the event of error
|
---|
398 | stderr: The stream receiving the error messages.
|
---|
399 | """
|
---|
400 | # This may be unrecognized because it's an exclusion list. If the
|
---|
401 | # setting name has the _excluded suffix, then check the root name.
|
---|
402 | unrecognized = True
|
---|
403 | m = re.match(_EXCLUDED_SUFFIX_RE, setting)
|
---|
404 | if m:
|
---|
405 | root_setting = m.group(1)
|
---|
406 | unrecognized = root_setting not in settings
|
---|
407 |
|
---|
408 | if unrecognized:
|
---|
409 | # We don't know this setting. Give a warning.
|
---|
410 | print(error_msg, file=stderr)
|
---|
411 |
|
---|
412 |
|
---|
413 | def FixVCMacroSlashes(s):
|
---|
414 | """Replace macros which have excessive following slashes.
|
---|
415 |
|
---|
416 | These macros are known to have a built-in trailing slash. Furthermore, many
|
---|
417 | scripts hiccup on processing paths with extra slashes in the middle.
|
---|
418 |
|
---|
419 | This list is probably not exhaustive. Add as needed.
|
---|
420 | """
|
---|
421 | if "$" in s:
|
---|
422 | s = fix_vc_macro_slashes_regex.sub(r"\1", s)
|
---|
423 | return s
|
---|
424 |
|
---|
425 |
|
---|
426 | def ConvertVCMacrosToMSBuild(s):
|
---|
427 | """Convert the MSVS macros found in the string to the MSBuild equivalent.
|
---|
428 |
|
---|
429 | This list is probably not exhaustive. Add as needed.
|
---|
430 | """
|
---|
431 | if "$" in s:
|
---|
432 | replace_map = {
|
---|
433 | "$(ConfigurationName)": "$(Configuration)",
|
---|
434 | "$(InputDir)": "%(RelativeDir)",
|
---|
435 | "$(InputExt)": "%(Extension)",
|
---|
436 | "$(InputFileName)": "%(Filename)%(Extension)",
|
---|
437 | "$(InputName)": "%(Filename)",
|
---|
438 | "$(InputPath)": "%(Identity)",
|
---|
439 | "$(ParentName)": "$(ProjectFileName)",
|
---|
440 | "$(PlatformName)": "$(Platform)",
|
---|
441 | "$(SafeInputName)": "%(Filename)",
|
---|
442 | }
|
---|
443 | for old, new in replace_map.items():
|
---|
444 | s = s.replace(old, new)
|
---|
445 | s = FixVCMacroSlashes(s)
|
---|
446 | return s
|
---|
447 |
|
---|
448 |
|
---|
449 | def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr):
|
---|
450 | """Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+).
|
---|
451 |
|
---|
452 | Args:
|
---|
453 | msvs_settings: A dictionary. The key is the tool name. The values are
|
---|
454 | themselves dictionaries of settings and their values.
|
---|
455 | stderr: The stream receiving the error messages.
|
---|
456 |
|
---|
457 | Returns:
|
---|
458 | A dictionary of MSBuild settings. The key is either the MSBuild tool name
|
---|
459 | or the empty string (for the global settings). The values are themselves
|
---|
460 | dictionaries of settings and their values.
|
---|
461 | """
|
---|
462 | msbuild_settings = {}
|
---|
463 | for msvs_tool_name, msvs_tool_settings in msvs_settings.items():
|
---|
464 | if msvs_tool_name in _msvs_to_msbuild_converters:
|
---|
465 | msvs_tool = _msvs_to_msbuild_converters[msvs_tool_name]
|
---|
466 | for msvs_setting, msvs_value in msvs_tool_settings.items():
|
---|
467 | if msvs_setting in msvs_tool:
|
---|
468 | # Invoke the translation function.
|
---|
469 | try:
|
---|
470 | msvs_tool[msvs_setting](msvs_value, msbuild_settings)
|
---|
471 | except ValueError as e:
|
---|
472 | print(
|
---|
473 | "Warning: while converting %s/%s to MSBuild, "
|
---|
474 | "%s" % (msvs_tool_name, msvs_setting, e),
|
---|
475 | file=stderr,
|
---|
476 | )
|
---|
477 | else:
|
---|
478 | _ValidateExclusionSetting(
|
---|
479 | msvs_setting,
|
---|
480 | msvs_tool,
|
---|
481 | (
|
---|
482 | "Warning: unrecognized setting %s/%s "
|
---|
483 | "while converting to MSBuild."
|
---|
484 | % (msvs_tool_name, msvs_setting)
|
---|
485 | ),
|
---|
486 | stderr,
|
---|
487 | )
|
---|
488 | else:
|
---|
489 | print(
|
---|
490 | "Warning: unrecognized tool %s while converting to "
|
---|
491 | "MSBuild." % msvs_tool_name,
|
---|
492 | file=stderr,
|
---|
493 | )
|
---|
494 | return msbuild_settings
|
---|
495 |
|
---|
496 |
|
---|
497 | def ValidateMSVSSettings(settings, stderr=sys.stderr):
|
---|
498 | """Validates that the names of the settings are valid for MSVS.
|
---|
499 |
|
---|
500 | Args:
|
---|
501 | settings: A dictionary. The key is the tool name. The values are
|
---|
502 | themselves dictionaries of settings and their values.
|
---|
503 | stderr: The stream receiving the error messages.
|
---|
504 | """
|
---|
505 | _ValidateSettings(_msvs_validators, settings, stderr)
|
---|
506 |
|
---|
507 |
|
---|
508 | def ValidateMSBuildSettings(settings, stderr=sys.stderr):
|
---|
509 | """Validates that the names of the settings are valid for MSBuild.
|
---|
510 |
|
---|
511 | Args:
|
---|
512 | settings: A dictionary. The key is the tool name. The values are
|
---|
513 | themselves dictionaries of settings and their values.
|
---|
514 | stderr: The stream receiving the error messages.
|
---|
515 | """
|
---|
516 | _ValidateSettings(_msbuild_validators, settings, stderr)
|
---|
517 |
|
---|
518 |
|
---|
519 | def _ValidateSettings(validators, settings, stderr):
|
---|
520 | """Validates that the settings are valid for MSBuild or MSVS.
|
---|
521 |
|
---|
522 | We currently only validate the names of the settings, not their values.
|
---|
523 |
|
---|
524 | Args:
|
---|
525 | validators: A dictionary of tools and their validators.
|
---|
526 | settings: A dictionary. The key is the tool name. The values are
|
---|
527 | themselves dictionaries of settings and their values.
|
---|
528 | stderr: The stream receiving the error messages.
|
---|
529 | """
|
---|
530 | for tool_name in settings:
|
---|
531 | if tool_name in validators:
|
---|
532 | tool_validators = validators[tool_name]
|
---|
533 | for setting, value in settings[tool_name].items():
|
---|
534 | if setting in tool_validators:
|
---|
535 | try:
|
---|
536 | tool_validators[setting](value)
|
---|
537 | except ValueError as e:
|
---|
538 | print(
|
---|
539 | "Warning: for %s/%s, %s" % (tool_name, setting, e),
|
---|
540 | file=stderr,
|
---|
541 | )
|
---|
542 | else:
|
---|
543 | _ValidateExclusionSetting(
|
---|
544 | setting,
|
---|
545 | tool_validators,
|
---|
546 | ("Warning: unrecognized setting %s/%s" % (tool_name, setting)),
|
---|
547 | stderr,
|
---|
548 | )
|
---|
549 |
|
---|
550 | else:
|
---|
551 | print("Warning: unrecognized tool %s" % (tool_name), file=stderr)
|
---|
552 |
|
---|
553 |
|
---|
554 | # MSVS and MBuild names of the tools.
|
---|
555 | _compile = _Tool("VCCLCompilerTool", "ClCompile")
|
---|
556 | _link = _Tool("VCLinkerTool", "Link")
|
---|
557 | _midl = _Tool("VCMIDLTool", "Midl")
|
---|
558 | _rc = _Tool("VCResourceCompilerTool", "ResourceCompile")
|
---|
559 | _lib = _Tool("VCLibrarianTool", "Lib")
|
---|
560 | _manifest = _Tool("VCManifestTool", "Manifest")
|
---|
561 | _masm = _Tool("MASM", "MASM")
|
---|
562 | _armasm = _Tool("ARMASM", "ARMASM")
|
---|
563 |
|
---|
564 |
|
---|
565 | _AddTool(_compile)
|
---|
566 | _AddTool(_link)
|
---|
567 | _AddTool(_midl)
|
---|
568 | _AddTool(_rc)
|
---|
569 | _AddTool(_lib)
|
---|
570 | _AddTool(_manifest)
|
---|
571 | _AddTool(_masm)
|
---|
572 | _AddTool(_armasm)
|
---|
573 | # Add sections only found in the MSBuild settings.
|
---|
574 | _msbuild_validators[""] = {}
|
---|
575 | _msbuild_validators["ProjectReference"] = {}
|
---|
576 | _msbuild_validators["ManifestResourceCompile"] = {}
|
---|
577 |
|
---|
578 | # Descriptions of the compiler options, i.e. VCCLCompilerTool in MSVS and
|
---|
579 | # ClCompile in MSBuild.
|
---|
580 | # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\cl.xml" for
|
---|
581 | # the schema of the MSBuild ClCompile settings.
|
---|
582 |
|
---|
583 | # Options that have the same name in MSVS and MSBuild
|
---|
584 | _Same(_compile, "AdditionalIncludeDirectories", _folder_list) # /I
|
---|
585 | _Same(_compile, "AdditionalOptions", _string_list)
|
---|
586 | _Same(_compile, "AdditionalUsingDirectories", _folder_list) # /AI
|
---|
587 | _Same(_compile, "AssemblerListingLocation", _file_name) # /Fa
|
---|
588 | _Same(_compile, "BrowseInformationFile", _file_name)
|
---|
589 | _Same(_compile, "BufferSecurityCheck", _boolean) # /GS
|
---|
590 | _Same(_compile, "DisableLanguageExtensions", _boolean) # /Za
|
---|
591 | _Same(_compile, "DisableSpecificWarnings", _string_list) # /wd
|
---|
592 | _Same(_compile, "EnableFiberSafeOptimizations", _boolean) # /GT
|
---|
593 | _Same(_compile, "EnablePREfast", _boolean) # /analyze Visible='false'
|
---|
594 | _Same(_compile, "ExpandAttributedSource", _boolean) # /Fx
|
---|
595 | _Same(_compile, "FloatingPointExceptions", _boolean) # /fp:except
|
---|
596 | _Same(_compile, "ForceConformanceInForLoopScope", _boolean) # /Zc:forScope
|
---|
597 | _Same(_compile, "ForcedIncludeFiles", _file_list) # /FI
|
---|
598 | _Same(_compile, "ForcedUsingFiles", _file_list) # /FU
|
---|
599 | _Same(_compile, "GenerateXMLDocumentationFiles", _boolean) # /doc
|
---|
600 | _Same(_compile, "IgnoreStandardIncludePath", _boolean) # /X
|
---|
601 | _Same(_compile, "MinimalRebuild", _boolean) # /Gm
|
---|
602 | _Same(_compile, "OmitDefaultLibName", _boolean) # /Zl
|
---|
603 | _Same(_compile, "OmitFramePointers", _boolean) # /Oy
|
---|
604 | _Same(_compile, "PreprocessorDefinitions", _string_list) # /D
|
---|
605 | _Same(_compile, "ProgramDataBaseFileName", _file_name) # /Fd
|
---|
606 | _Same(_compile, "RuntimeTypeInfo", _boolean) # /GR
|
---|
607 | _Same(_compile, "ShowIncludes", _boolean) # /showIncludes
|
---|
608 | _Same(_compile, "SmallerTypeCheck", _boolean) # /RTCc
|
---|
609 | _Same(_compile, "StringPooling", _boolean) # /GF
|
---|
610 | _Same(_compile, "SuppressStartupBanner", _boolean) # /nologo
|
---|
611 | _Same(_compile, "TreatWChar_tAsBuiltInType", _boolean) # /Zc:wchar_t
|
---|
612 | _Same(_compile, "UndefineAllPreprocessorDefinitions", _boolean) # /u
|
---|
613 | _Same(_compile, "UndefinePreprocessorDefinitions", _string_list) # /U
|
---|
614 | _Same(_compile, "UseFullPaths", _boolean) # /FC
|
---|
615 | _Same(_compile, "WholeProgramOptimization", _boolean) # /GL
|
---|
616 | _Same(_compile, "XMLDocumentationFileName", _file_name)
|
---|
617 | _Same(_compile, "CompileAsWinRT", _boolean) # /ZW
|
---|
618 |
|
---|
619 | _Same(
|
---|
620 | _compile,
|
---|
621 | "AssemblerOutput",
|
---|
622 | _Enumeration(
|
---|
623 | [
|
---|
624 | "NoListing",
|
---|
625 | "AssemblyCode", # /FA
|
---|
626 | "All", # /FAcs
|
---|
627 | "AssemblyAndMachineCode", # /FAc
|
---|
628 | "AssemblyAndSourceCode",
|
---|
629 | ]
|
---|
630 | ),
|
---|
631 | ) # /FAs
|
---|
632 | _Same(
|
---|
633 | _compile,
|
---|
634 | "BasicRuntimeChecks",
|
---|
635 | _Enumeration(
|
---|
636 | [
|
---|
637 | "Default",
|
---|
638 | "StackFrameRuntimeCheck", # /RTCs
|
---|
639 | "UninitializedLocalUsageCheck", # /RTCu
|
---|
640 | "EnableFastChecks",
|
---|
641 | ]
|
---|
642 | ),
|
---|
643 | ) # /RTC1
|
---|
644 | _Same(
|
---|
645 | _compile, "BrowseInformation", _Enumeration(["false", "true", "true"]) # /FR
|
---|
646 | ) # /Fr
|
---|
647 | _Same(
|
---|
648 | _compile,
|
---|
649 | "CallingConvention",
|
---|
650 | _Enumeration(["Cdecl", "FastCall", "StdCall", "VectorCall"]), # /Gd # /Gr # /Gz
|
---|
651 | ) # /Gv
|
---|
652 | _Same(
|
---|
653 | _compile,
|
---|
654 | "CompileAs",
|
---|
655 | _Enumeration(["Default", "CompileAsC", "CompileAsCpp"]), # /TC
|
---|
656 | ) # /TP
|
---|
657 | _Same(
|
---|
658 | _compile,
|
---|
659 | "DebugInformationFormat",
|
---|
660 | _Enumeration(
|
---|
661 | [
|
---|
662 | "", # Disabled
|
---|
663 | "OldStyle", # /Z7
|
---|
664 | None,
|
---|
665 | "ProgramDatabase", # /Zi
|
---|
666 | "EditAndContinue",
|
---|
667 | ]
|
---|
668 | ),
|
---|
669 | ) # /ZI
|
---|
670 | _Same(
|
---|
671 | _compile,
|
---|
672 | "EnableEnhancedInstructionSet",
|
---|
673 | _Enumeration(
|
---|
674 | [
|
---|
675 | "NotSet",
|
---|
676 | "StreamingSIMDExtensions", # /arch:SSE
|
---|
677 | "StreamingSIMDExtensions2", # /arch:SSE2
|
---|
678 | "AdvancedVectorExtensions", # /arch:AVX (vs2012+)
|
---|
679 | "NoExtensions", # /arch:IA32 (vs2012+)
|
---|
680 | # This one only exists in the new msbuild format.
|
---|
681 | "AdvancedVectorExtensions2", # /arch:AVX2 (vs2013r2+)
|
---|
682 | ]
|
---|
683 | ),
|
---|
684 | )
|
---|
685 | _Same(
|
---|
686 | _compile,
|
---|
687 | "ErrorReporting",
|
---|
688 | _Enumeration(
|
---|
689 | [
|
---|
690 | "None", # /errorReport:none
|
---|
691 | "Prompt", # /errorReport:prompt
|
---|
692 | "Queue",
|
---|
693 | ], # /errorReport:queue
|
---|
694 | new=["Send"],
|
---|
695 | ),
|
---|
696 | ) # /errorReport:send"
|
---|
697 | _Same(
|
---|
698 | _compile,
|
---|
699 | "ExceptionHandling",
|
---|
700 | _Enumeration(["false", "Sync", "Async"], new=["SyncCThrow"]), # /EHsc # /EHa
|
---|
701 | ) # /EHs
|
---|
702 | _Same(
|
---|
703 | _compile, "FavorSizeOrSpeed", _Enumeration(["Neither", "Speed", "Size"]) # /Ot
|
---|
704 | ) # /Os
|
---|
705 | _Same(
|
---|
706 | _compile,
|
---|
707 | "FloatingPointModel",
|
---|
708 | _Enumeration(["Precise", "Strict", "Fast"]), # /fp:precise # /fp:strict
|
---|
709 | ) # /fp:fast
|
---|
710 | _Same(
|
---|
711 | _compile,
|
---|
712 | "InlineFunctionExpansion",
|
---|
713 | _Enumeration(
|
---|
714 | ["Default", "OnlyExplicitInline", "AnySuitable"], # /Ob1 # /Ob2
|
---|
715 | new=["Disabled"],
|
---|
716 | ),
|
---|
717 | ) # /Ob0
|
---|
718 | _Same(
|
---|
719 | _compile,
|
---|
720 | "Optimization",
|
---|
721 | _Enumeration(["Disabled", "MinSpace", "MaxSpeed", "Full"]), # /Od # /O1 # /O2
|
---|
722 | ) # /Ox
|
---|
723 | _Same(
|
---|
724 | _compile,
|
---|
725 | "RuntimeLibrary",
|
---|
726 | _Enumeration(
|
---|
727 | [
|
---|
728 | "MultiThreaded", # /MT
|
---|
729 | "MultiThreadedDebug", # /MTd
|
---|
730 | "MultiThreadedDLL", # /MD
|
---|
731 | "MultiThreadedDebugDLL",
|
---|
732 | ]
|
---|
733 | ),
|
---|
734 | ) # /MDd
|
---|
735 | _Same(
|
---|
736 | _compile,
|
---|
737 | "StructMemberAlignment",
|
---|
738 | _Enumeration(
|
---|
739 | [
|
---|
740 | "Default",
|
---|
741 | "1Byte", # /Zp1
|
---|
742 | "2Bytes", # /Zp2
|
---|
743 | "4Bytes", # /Zp4
|
---|
744 | "8Bytes", # /Zp8
|
---|
745 | "16Bytes",
|
---|
746 | ]
|
---|
747 | ),
|
---|
748 | ) # /Zp16
|
---|
749 | _Same(
|
---|
750 | _compile,
|
---|
751 | "WarningLevel",
|
---|
752 | _Enumeration(
|
---|
753 | [
|
---|
754 | "TurnOffAllWarnings", # /W0
|
---|
755 | "Level1", # /W1
|
---|
756 | "Level2", # /W2
|
---|
757 | "Level3", # /W3
|
---|
758 | "Level4",
|
---|
759 | ], # /W4
|
---|
760 | new=["EnableAllWarnings"],
|
---|
761 | ),
|
---|
762 | ) # /Wall
|
---|
763 |
|
---|
764 | # Options found in MSVS that have been renamed in MSBuild.
|
---|
765 | _Renamed(
|
---|
766 | _compile, "EnableFunctionLevelLinking", "FunctionLevelLinking", _boolean
|
---|
767 | ) # /Gy
|
---|
768 | _Renamed(_compile, "EnableIntrinsicFunctions", "IntrinsicFunctions", _boolean) # /Oi
|
---|
769 | _Renamed(_compile, "KeepComments", "PreprocessKeepComments", _boolean) # /C
|
---|
770 | _Renamed(_compile, "ObjectFile", "ObjectFileName", _file_name) # /Fo
|
---|
771 | _Renamed(_compile, "OpenMP", "OpenMPSupport", _boolean) # /openmp
|
---|
772 | _Renamed(
|
---|
773 | _compile, "PrecompiledHeaderThrough", "PrecompiledHeaderFile", _file_name
|
---|
774 | ) # Used with /Yc and /Yu
|
---|
775 | _Renamed(
|
---|
776 | _compile, "PrecompiledHeaderFile", "PrecompiledHeaderOutputFile", _file_name
|
---|
777 | ) # /Fp
|
---|
778 | _Renamed(
|
---|
779 | _compile,
|
---|
780 | "UsePrecompiledHeader",
|
---|
781 | "PrecompiledHeader",
|
---|
782 | _Enumeration(
|
---|
783 | ["NotUsing", "Create", "Use"] # VS recognized '' for this value too. # /Yc
|
---|
784 | ),
|
---|
785 | ) # /Yu
|
---|
786 | _Renamed(_compile, "WarnAsError", "TreatWarningAsError", _boolean) # /WX
|
---|
787 |
|
---|
788 | _ConvertedToAdditionalOption(_compile, "DefaultCharIsUnsigned", "/J")
|
---|
789 |
|
---|
790 | # MSVS options not found in MSBuild.
|
---|
791 | _MSVSOnly(_compile, "Detect64BitPortabilityProblems", _boolean)
|
---|
792 | _MSVSOnly(_compile, "UseUnicodeResponseFiles", _boolean)
|
---|
793 |
|
---|
794 | # MSBuild options not found in MSVS.
|
---|
795 | _MSBuildOnly(_compile, "BuildingInIDE", _boolean)
|
---|
796 | _MSBuildOnly(
|
---|
797 | _compile, "CompileAsManaged", _Enumeration([], new=["false", "true"])
|
---|
798 | ) # /clr
|
---|
799 | _MSBuildOnly(_compile, "CreateHotpatchableImage", _boolean) # /hotpatch
|
---|
800 | _MSBuildOnly(_compile, "MultiProcessorCompilation", _boolean) # /MP
|
---|
801 | _MSBuildOnly(_compile, "PreprocessOutputPath", _string) # /Fi
|
---|
802 | _MSBuildOnly(_compile, "ProcessorNumber", _integer) # the number of processors
|
---|
803 | _MSBuildOnly(_compile, "TrackerLogDirectory", _folder_name)
|
---|
804 | _MSBuildOnly(_compile, "TreatSpecificWarningsAsErrors", _string_list) # /we
|
---|
805 | _MSBuildOnly(_compile, "UseUnicodeForAssemblerListing", _boolean) # /FAu
|
---|
806 |
|
---|
807 | # Defines a setting that needs very customized processing
|
---|
808 | _CustomGeneratePreprocessedFile(_compile, "GeneratePreprocessedFile")
|
---|
809 |
|
---|
810 |
|
---|
811 | # Directives for converting MSVS VCLinkerTool to MSBuild Link.
|
---|
812 | # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\link.xml" for
|
---|
813 | # the schema of the MSBuild Link settings.
|
---|
814 |
|
---|
815 | # Options that have the same name in MSVS and MSBuild
|
---|
816 | _Same(_link, "AdditionalDependencies", _file_list)
|
---|
817 | _Same(_link, "AdditionalLibraryDirectories", _folder_list) # /LIBPATH
|
---|
818 | # /MANIFESTDEPENDENCY:
|
---|
819 | _Same(_link, "AdditionalManifestDependencies", _file_list)
|
---|
820 | _Same(_link, "AdditionalOptions", _string_list)
|
---|
821 | _Same(_link, "AddModuleNamesToAssembly", _file_list) # /ASSEMBLYMODULE
|
---|
822 | _Same(_link, "AllowIsolation", _boolean) # /ALLOWISOLATION
|
---|
823 | _Same(_link, "AssemblyLinkResource", _file_list) # /ASSEMBLYLINKRESOURCE
|
---|
824 | _Same(_link, "BaseAddress", _string) # /BASE
|
---|
825 | _Same(_link, "CLRUnmanagedCodeCheck", _boolean) # /CLRUNMANAGEDCODECHECK
|
---|
826 | _Same(_link, "DelayLoadDLLs", _file_list) # /DELAYLOAD
|
---|
827 | _Same(_link, "DelaySign", _boolean) # /DELAYSIGN
|
---|
828 | _Same(_link, "EmbedManagedResourceFile", _file_list) # /ASSEMBLYRESOURCE
|
---|
829 | _Same(_link, "EnableUAC", _boolean) # /MANIFESTUAC
|
---|
830 | _Same(_link, "EntryPointSymbol", _string) # /ENTRY
|
---|
831 | _Same(_link, "ForceSymbolReferences", _file_list) # /INCLUDE
|
---|
832 | _Same(_link, "FunctionOrder", _file_name) # /ORDER
|
---|
833 | _Same(_link, "GenerateDebugInformation", _boolean) # /DEBUG
|
---|
834 | _Same(_link, "GenerateMapFile", _boolean) # /MAP
|
---|
835 | _Same(_link, "HeapCommitSize", _string)
|
---|
836 | _Same(_link, "HeapReserveSize", _string) # /HEAP
|
---|
837 | _Same(_link, "IgnoreAllDefaultLibraries", _boolean) # /NODEFAULTLIB
|
---|
838 | _Same(_link, "IgnoreEmbeddedIDL", _boolean) # /IGNOREIDL
|
---|
839 | _Same(_link, "ImportLibrary", _file_name) # /IMPLIB
|
---|
840 | _Same(_link, "KeyContainer", _file_name) # /KEYCONTAINER
|
---|
841 | _Same(_link, "KeyFile", _file_name) # /KEYFILE
|
---|
842 | _Same(_link, "ManifestFile", _file_name) # /ManifestFile
|
---|
843 | _Same(_link, "MapExports", _boolean) # /MAPINFO:EXPORTS
|
---|
844 | _Same(_link, "MapFileName", _file_name)
|
---|
845 | _Same(_link, "MergedIDLBaseFileName", _file_name) # /IDLOUT
|
---|
846 | _Same(_link, "MergeSections", _string) # /MERGE
|
---|
847 | _Same(_link, "MidlCommandFile", _file_name) # /MIDL
|
---|
848 | _Same(_link, "ModuleDefinitionFile", _file_name) # /DEF
|
---|
849 | _Same(_link, "OutputFile", _file_name) # /OUT
|
---|
850 | _Same(_link, "PerUserRedirection", _boolean)
|
---|
851 | _Same(_link, "Profile", _boolean) # /PROFILE
|
---|
852 | _Same(_link, "ProfileGuidedDatabase", _file_name) # /PGD
|
---|
853 | _Same(_link, "ProgramDatabaseFile", _file_name) # /PDB
|
---|
854 | _Same(_link, "RegisterOutput", _boolean)
|
---|
855 | _Same(_link, "SetChecksum", _boolean) # /RELEASE
|
---|
856 | _Same(_link, "StackCommitSize", _string)
|
---|
857 | _Same(_link, "StackReserveSize", _string) # /STACK
|
---|
858 | _Same(_link, "StripPrivateSymbols", _file_name) # /PDBSTRIPPED
|
---|
859 | _Same(_link, "SupportUnloadOfDelayLoadedDLL", _boolean) # /DELAY:UNLOAD
|
---|
860 | _Same(_link, "SuppressStartupBanner", _boolean) # /NOLOGO
|
---|
861 | _Same(_link, "SwapRunFromCD", _boolean) # /SWAPRUN:CD
|
---|
862 | _Same(_link, "TurnOffAssemblyGeneration", _boolean) # /NOASSEMBLY
|
---|
863 | _Same(_link, "TypeLibraryFile", _file_name) # /TLBOUT
|
---|
864 | _Same(_link, "TypeLibraryResourceID", _integer) # /TLBID
|
---|
865 | _Same(_link, "UACUIAccess", _boolean) # /uiAccess='true'
|
---|
866 | _Same(_link, "Version", _string) # /VERSION
|
---|
867 |
|
---|
868 | _Same(_link, "EnableCOMDATFolding", _newly_boolean) # /OPT:ICF
|
---|
869 | _Same(_link, "FixedBaseAddress", _newly_boolean) # /FIXED
|
---|
870 | _Same(_link, "LargeAddressAware", _newly_boolean) # /LARGEADDRESSAWARE
|
---|
871 | _Same(_link, "OptimizeReferences", _newly_boolean) # /OPT:REF
|
---|
872 | _Same(_link, "RandomizedBaseAddress", _newly_boolean) # /DYNAMICBASE
|
---|
873 | _Same(_link, "TerminalServerAware", _newly_boolean) # /TSAWARE
|
---|
874 |
|
---|
875 | _subsystem_enumeration = _Enumeration(
|
---|
876 | [
|
---|
877 | "NotSet",
|
---|
878 | "Console", # /SUBSYSTEM:CONSOLE
|
---|
879 | "Windows", # /SUBSYSTEM:WINDOWS
|
---|
880 | "Native", # /SUBSYSTEM:NATIVE
|
---|
881 | "EFI Application", # /SUBSYSTEM:EFI_APPLICATION
|
---|
882 | "EFI Boot Service Driver", # /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
|
---|
883 | "EFI ROM", # /SUBSYSTEM:EFI_ROM
|
---|
884 | "EFI Runtime", # /SUBSYSTEM:EFI_RUNTIME_DRIVER
|
---|
885 | "WindowsCE",
|
---|
886 | ], # /SUBSYSTEM:WINDOWSCE
|
---|
887 | new=["POSIX"],
|
---|
888 | ) # /SUBSYSTEM:POSIX
|
---|
889 |
|
---|
890 | _target_machine_enumeration = _Enumeration(
|
---|
891 | [
|
---|
892 | "NotSet",
|
---|
893 | "MachineX86", # /MACHINE:X86
|
---|
894 | None,
|
---|
895 | "MachineARM", # /MACHINE:ARM
|
---|
896 | "MachineEBC", # /MACHINE:EBC
|
---|
897 | "MachineIA64", # /MACHINE:IA64
|
---|
898 | None,
|
---|
899 | "MachineMIPS", # /MACHINE:MIPS
|
---|
900 | "MachineMIPS16", # /MACHINE:MIPS16
|
---|
901 | "MachineMIPSFPU", # /MACHINE:MIPSFPU
|
---|
902 | "MachineMIPSFPU16", # /MACHINE:MIPSFPU16
|
---|
903 | None,
|
---|
904 | None,
|
---|
905 | None,
|
---|
906 | "MachineSH4", # /MACHINE:SH4
|
---|
907 | None,
|
---|
908 | "MachineTHUMB", # /MACHINE:THUMB
|
---|
909 | "MachineX64",
|
---|
910 | ]
|
---|
911 | ) # /MACHINE:X64
|
---|
912 |
|
---|
913 | _Same(
|
---|
914 | _link, "AssemblyDebug", _Enumeration(["", "true", "false"]) # /ASSEMBLYDEBUG
|
---|
915 | ) # /ASSEMBLYDEBUG:DISABLE
|
---|
916 | _Same(
|
---|
917 | _link,
|
---|
918 | "CLRImageType",
|
---|
919 | _Enumeration(
|
---|
920 | [
|
---|
921 | "Default",
|
---|
922 | "ForceIJWImage", # /CLRIMAGETYPE:IJW
|
---|
923 | "ForcePureILImage", # /Switch="CLRIMAGETYPE:PURE
|
---|
924 | "ForceSafeILImage",
|
---|
925 | ]
|
---|
926 | ),
|
---|
927 | ) # /Switch="CLRIMAGETYPE:SAFE
|
---|
928 | _Same(
|
---|
929 | _link,
|
---|
930 | "CLRThreadAttribute",
|
---|
931 | _Enumeration(
|
---|
932 | [
|
---|
933 | "DefaultThreadingAttribute", # /CLRTHREADATTRIBUTE:NONE
|
---|
934 | "MTAThreadingAttribute", # /CLRTHREADATTRIBUTE:MTA
|
---|
935 | "STAThreadingAttribute",
|
---|
936 | ]
|
---|
937 | ),
|
---|
938 | ) # /CLRTHREADATTRIBUTE:STA
|
---|
939 | _Same(
|
---|
940 | _link,
|
---|
941 | "DataExecutionPrevention",
|
---|
942 | _Enumeration(["", "false", "true"]), # /NXCOMPAT:NO
|
---|
943 | ) # /NXCOMPAT
|
---|
944 | _Same(
|
---|
945 | _link,
|
---|
946 | "Driver",
|
---|
947 | _Enumeration(["NotSet", "Driver", "UpOnly", "WDM"]), # /Driver # /DRIVER:UPONLY
|
---|
948 | ) # /DRIVER:WDM
|
---|
949 | _Same(
|
---|
950 | _link,
|
---|
951 | "LinkTimeCodeGeneration",
|
---|
952 | _Enumeration(
|
---|
953 | [
|
---|
954 | "Default",
|
---|
955 | "UseLinkTimeCodeGeneration", # /LTCG
|
---|
956 | "PGInstrument", # /LTCG:PGInstrument
|
---|
957 | "PGOptimization", # /LTCG:PGOptimize
|
---|
958 | "PGUpdate",
|
---|
959 | ]
|
---|
960 | ),
|
---|
961 | ) # /LTCG:PGUpdate
|
---|
962 | _Same(
|
---|
963 | _link,
|
---|
964 | "ShowProgress",
|
---|
965 | _Enumeration(
|
---|
966 | ["NotSet", "LinkVerbose", "LinkVerboseLib"], # /VERBOSE # /VERBOSE:Lib
|
---|
967 | new=[
|
---|
968 | "LinkVerboseICF", # /VERBOSE:ICF
|
---|
969 | "LinkVerboseREF", # /VERBOSE:REF
|
---|
970 | "LinkVerboseSAFESEH", # /VERBOSE:SAFESEH
|
---|
971 | "LinkVerboseCLR",
|
---|
972 | ],
|
---|
973 | ),
|
---|
974 | ) # /VERBOSE:CLR
|
---|
975 | _Same(_link, "SubSystem", _subsystem_enumeration)
|
---|
976 | _Same(_link, "TargetMachine", _target_machine_enumeration)
|
---|
977 | _Same(
|
---|
978 | _link,
|
---|
979 | "UACExecutionLevel",
|
---|
980 | _Enumeration(
|
---|
981 | [
|
---|
982 | "AsInvoker", # /level='asInvoker'
|
---|
983 | "HighestAvailable", # /level='highestAvailable'
|
---|
984 | "RequireAdministrator",
|
---|
985 | ]
|
---|
986 | ),
|
---|
987 | ) # /level='requireAdministrator'
|
---|
988 | _Same(_link, "MinimumRequiredVersion", _string)
|
---|
989 | _Same(_link, "TreatLinkerWarningAsErrors", _boolean) # /WX
|
---|
990 |
|
---|
991 |
|
---|
992 | # Options found in MSVS that have been renamed in MSBuild.
|
---|
993 | _Renamed(
|
---|
994 | _link,
|
---|
995 | "ErrorReporting",
|
---|
996 | "LinkErrorReporting",
|
---|
997 | _Enumeration(
|
---|
998 | [
|
---|
999 | "NoErrorReport", # /ERRORREPORT:NONE
|
---|
1000 | "PromptImmediately", # /ERRORREPORT:PROMPT
|
---|
1001 | "QueueForNextLogin",
|
---|
1002 | ], # /ERRORREPORT:QUEUE
|
---|
1003 | new=["SendErrorReport"],
|
---|
1004 | ),
|
---|
1005 | ) # /ERRORREPORT:SEND
|
---|
1006 | _Renamed(
|
---|
1007 | _link, "IgnoreDefaultLibraryNames", "IgnoreSpecificDefaultLibraries", _file_list
|
---|
1008 | ) # /NODEFAULTLIB
|
---|
1009 | _Renamed(_link, "ResourceOnlyDLL", "NoEntryPoint", _boolean) # /NOENTRY
|
---|
1010 | _Renamed(_link, "SwapRunFromNet", "SwapRunFromNET", _boolean) # /SWAPRUN:NET
|
---|
1011 |
|
---|
1012 | _Moved(_link, "GenerateManifest", "", _boolean)
|
---|
1013 | _Moved(_link, "IgnoreImportLibrary", "", _boolean)
|
---|
1014 | _Moved(_link, "LinkIncremental", "", _newly_boolean)
|
---|
1015 | _Moved(_link, "LinkLibraryDependencies", "ProjectReference", _boolean)
|
---|
1016 | _Moved(_link, "UseLibraryDependencyInputs", "ProjectReference", _boolean)
|
---|
1017 |
|
---|
1018 | # MSVS options not found in MSBuild.
|
---|
1019 | _MSVSOnly(_link, "OptimizeForWindows98", _newly_boolean)
|
---|
1020 | _MSVSOnly(_link, "UseUnicodeResponseFiles", _boolean)
|
---|
1021 |
|
---|
1022 | # MSBuild options not found in MSVS.
|
---|
1023 | _MSBuildOnly(_link, "BuildingInIDE", _boolean)
|
---|
1024 | _MSBuildOnly(_link, "ImageHasSafeExceptionHandlers", _boolean) # /SAFESEH
|
---|
1025 | _MSBuildOnly(_link, "LinkDLL", _boolean) # /DLL Visible='false'
|
---|
1026 | _MSBuildOnly(_link, "LinkStatus", _boolean) # /LTCG:STATUS
|
---|
1027 | _MSBuildOnly(_link, "PreventDllBinding", _boolean) # /ALLOWBIND
|
---|
1028 | _MSBuildOnly(_link, "SupportNobindOfDelayLoadedDLL", _boolean) # /DELAY:NOBIND
|
---|
1029 | _MSBuildOnly(_link, "TrackerLogDirectory", _folder_name)
|
---|
1030 | _MSBuildOnly(_link, "MSDOSStubFileName", _file_name) # /STUB Visible='false'
|
---|
1031 | _MSBuildOnly(_link, "SectionAlignment", _integer) # /ALIGN
|
---|
1032 | _MSBuildOnly(_link, "SpecifySectionAttributes", _string) # /SECTION
|
---|
1033 | _MSBuildOnly(
|
---|
1034 | _link,
|
---|
1035 | "ForceFileOutput",
|
---|
1036 | _Enumeration(
|
---|
1037 | [],
|
---|
1038 | new=[
|
---|
1039 | "Enabled", # /FORCE
|
---|
1040 | # /FORCE:MULTIPLE
|
---|
1041 | "MultiplyDefinedSymbolOnly",
|
---|
1042 | "UndefinedSymbolOnly",
|
---|
1043 | ],
|
---|
1044 | ),
|
---|
1045 | ) # /FORCE:UNRESOLVED
|
---|
1046 | _MSBuildOnly(
|
---|
1047 | _link,
|
---|
1048 | "CreateHotPatchableImage",
|
---|
1049 | _Enumeration(
|
---|
1050 | [],
|
---|
1051 | new=[
|
---|
1052 | "Enabled", # /FUNCTIONPADMIN
|
---|
1053 | "X86Image", # /FUNCTIONPADMIN:5
|
---|
1054 | "X64Image", # /FUNCTIONPADMIN:6
|
---|
1055 | "ItaniumImage",
|
---|
1056 | ],
|
---|
1057 | ),
|
---|
1058 | ) # /FUNCTIONPADMIN:16
|
---|
1059 | _MSBuildOnly(
|
---|
1060 | _link,
|
---|
1061 | "CLRSupportLastError",
|
---|
1062 | _Enumeration(
|
---|
1063 | [],
|
---|
1064 | new=[
|
---|
1065 | "Enabled", # /CLRSupportLastError
|
---|
1066 | "Disabled", # /CLRSupportLastError:NO
|
---|
1067 | # /CLRSupportLastError:SYSTEMDLL
|
---|
1068 | "SystemDlls",
|
---|
1069 | ],
|
---|
1070 | ),
|
---|
1071 | )
|
---|
1072 |
|
---|
1073 |
|
---|
1074 | # Directives for converting VCResourceCompilerTool to ResourceCompile.
|
---|
1075 | # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\rc.xml" for
|
---|
1076 | # the schema of the MSBuild ResourceCompile settings.
|
---|
1077 |
|
---|
1078 | _Same(_rc, "AdditionalOptions", _string_list)
|
---|
1079 | _Same(_rc, "AdditionalIncludeDirectories", _folder_list) # /I
|
---|
1080 | _Same(_rc, "Culture", _Integer(msbuild_base=16))
|
---|
1081 | _Same(_rc, "IgnoreStandardIncludePath", _boolean) # /X
|
---|
1082 | _Same(_rc, "PreprocessorDefinitions", _string_list) # /D
|
---|
1083 | _Same(_rc, "ResourceOutputFileName", _string) # /fo
|
---|
1084 | _Same(_rc, "ShowProgress", _boolean) # /v
|
---|
1085 | # There is no UI in VisualStudio 2008 to set the following properties.
|
---|
1086 | # However they are found in CL and other tools. Include them here for
|
---|
1087 | # completeness, as they are very likely to have the same usage pattern.
|
---|
1088 | _Same(_rc, "SuppressStartupBanner", _boolean) # /nologo
|
---|
1089 | _Same(_rc, "UndefinePreprocessorDefinitions", _string_list) # /u
|
---|
1090 |
|
---|
1091 | # MSBuild options not found in MSVS.
|
---|
1092 | _MSBuildOnly(_rc, "NullTerminateStrings", _boolean) # /n
|
---|
1093 | _MSBuildOnly(_rc, "TrackerLogDirectory", _folder_name)
|
---|
1094 |
|
---|
1095 |
|
---|
1096 | # Directives for converting VCMIDLTool to Midl.
|
---|
1097 | # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\midl.xml" for
|
---|
1098 | # the schema of the MSBuild Midl settings.
|
---|
1099 |
|
---|
1100 | _Same(_midl, "AdditionalIncludeDirectories", _folder_list) # /I
|
---|
1101 | _Same(_midl, "AdditionalOptions", _string_list)
|
---|
1102 | _Same(_midl, "CPreprocessOptions", _string) # /cpp_opt
|
---|
1103 | _Same(_midl, "ErrorCheckAllocations", _boolean) # /error allocation
|
---|
1104 | _Same(_midl, "ErrorCheckBounds", _boolean) # /error bounds_check
|
---|
1105 | _Same(_midl, "ErrorCheckEnumRange", _boolean) # /error enum
|
---|
1106 | _Same(_midl, "ErrorCheckRefPointers", _boolean) # /error ref
|
---|
1107 | _Same(_midl, "ErrorCheckStubData", _boolean) # /error stub_data
|
---|
1108 | _Same(_midl, "GenerateStublessProxies", _boolean) # /Oicf
|
---|
1109 | _Same(_midl, "GenerateTypeLibrary", _boolean)
|
---|
1110 | _Same(_midl, "HeaderFileName", _file_name) # /h
|
---|
1111 | _Same(_midl, "IgnoreStandardIncludePath", _boolean) # /no_def_idir
|
---|
1112 | _Same(_midl, "InterfaceIdentifierFileName", _file_name) # /iid
|
---|
1113 | _Same(_midl, "MkTypLibCompatible", _boolean) # /mktyplib203
|
---|
1114 | _Same(_midl, "OutputDirectory", _string) # /out
|
---|
1115 | _Same(_midl, "PreprocessorDefinitions", _string_list) # /D
|
---|
1116 | _Same(_midl, "ProxyFileName", _file_name) # /proxy
|
---|
1117 | _Same(_midl, "RedirectOutputAndErrors", _file_name) # /o
|
---|
1118 | _Same(_midl, "SuppressStartupBanner", _boolean) # /nologo
|
---|
1119 | _Same(_midl, "TypeLibraryName", _file_name) # /tlb
|
---|
1120 | _Same(_midl, "UndefinePreprocessorDefinitions", _string_list) # /U
|
---|
1121 | _Same(_midl, "WarnAsError", _boolean) # /WX
|
---|
1122 |
|
---|
1123 | _Same(
|
---|
1124 | _midl,
|
---|
1125 | "DefaultCharType",
|
---|
1126 | _Enumeration(["Unsigned", "Signed", "Ascii"]), # /char unsigned # /char signed
|
---|
1127 | ) # /char ascii7
|
---|
1128 | _Same(
|
---|
1129 | _midl,
|
---|
1130 | "TargetEnvironment",
|
---|
1131 | _Enumeration(
|
---|
1132 | [
|
---|
1133 | "NotSet",
|
---|
1134 | "Win32", # /env win32
|
---|
1135 | "Itanium", # /env ia64
|
---|
1136 | "X64", # /env x64
|
---|
1137 | "ARM64", # /env arm64
|
---|
1138 | ]
|
---|
1139 | ),
|
---|
1140 | )
|
---|
1141 | _Same(
|
---|
1142 | _midl,
|
---|
1143 | "EnableErrorChecks",
|
---|
1144 | _Enumeration(["EnableCustom", "None", "All"]), # /error none
|
---|
1145 | ) # /error all
|
---|
1146 | _Same(
|
---|
1147 | _midl,
|
---|
1148 | "StructMemberAlignment",
|
---|
1149 | _Enumeration(["NotSet", "1", "2", "4", "8"]), # Zp1 # Zp2 # Zp4
|
---|
1150 | ) # Zp8
|
---|
1151 | _Same(
|
---|
1152 | _midl,
|
---|
1153 | "WarningLevel",
|
---|
1154 | _Enumeration(["0", "1", "2", "3", "4"]), # /W0 # /W1 # /W2 # /W3
|
---|
1155 | ) # /W4
|
---|
1156 |
|
---|
1157 | _Renamed(_midl, "DLLDataFileName", "DllDataFileName", _file_name) # /dlldata
|
---|
1158 | _Renamed(_midl, "ValidateParameters", "ValidateAllParameters", _boolean) # /robust
|
---|
1159 |
|
---|
1160 | # MSBuild options not found in MSVS.
|
---|
1161 | _MSBuildOnly(_midl, "ApplicationConfigurationMode", _boolean) # /app_config
|
---|
1162 | _MSBuildOnly(_midl, "ClientStubFile", _file_name) # /cstub
|
---|
1163 | _MSBuildOnly(
|
---|
1164 | _midl, "GenerateClientFiles", _Enumeration([], new=["Stub", "None"]) # /client stub
|
---|
1165 | ) # /client none
|
---|
1166 | _MSBuildOnly(
|
---|
1167 | _midl, "GenerateServerFiles", _Enumeration([], new=["Stub", "None"]) # /client stub
|
---|
1168 | ) # /client none
|
---|
1169 | _MSBuildOnly(_midl, "LocaleID", _integer) # /lcid DECIMAL
|
---|
1170 | _MSBuildOnly(_midl, "ServerStubFile", _file_name) # /sstub
|
---|
1171 | _MSBuildOnly(_midl, "SuppressCompilerWarnings", _boolean) # /no_warn
|
---|
1172 | _MSBuildOnly(_midl, "TrackerLogDirectory", _folder_name)
|
---|
1173 | _MSBuildOnly(
|
---|
1174 | _midl, "TypeLibFormat", _Enumeration([], new=["NewFormat", "OldFormat"]) # /newtlb
|
---|
1175 | ) # /oldtlb
|
---|
1176 |
|
---|
1177 |
|
---|
1178 | # Directives for converting VCLibrarianTool to Lib.
|
---|
1179 | # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\lib.xml" for
|
---|
1180 | # the schema of the MSBuild Lib settings.
|
---|
1181 |
|
---|
1182 | _Same(_lib, "AdditionalDependencies", _file_list)
|
---|
1183 | _Same(_lib, "AdditionalLibraryDirectories", _folder_list) # /LIBPATH
|
---|
1184 | _Same(_lib, "AdditionalOptions", _string_list)
|
---|
1185 | _Same(_lib, "ExportNamedFunctions", _string_list) # /EXPORT
|
---|
1186 | _Same(_lib, "ForceSymbolReferences", _string) # /INCLUDE
|
---|
1187 | _Same(_lib, "IgnoreAllDefaultLibraries", _boolean) # /NODEFAULTLIB
|
---|
1188 | _Same(_lib, "IgnoreSpecificDefaultLibraries", _file_list) # /NODEFAULTLIB
|
---|
1189 | _Same(_lib, "ModuleDefinitionFile", _file_name) # /DEF
|
---|
1190 | _Same(_lib, "OutputFile", _file_name) # /OUT
|
---|
1191 | _Same(_lib, "SuppressStartupBanner", _boolean) # /NOLOGO
|
---|
1192 | _Same(_lib, "UseUnicodeResponseFiles", _boolean)
|
---|
1193 | _Same(_lib, "LinkTimeCodeGeneration", _boolean) # /LTCG
|
---|
1194 | _Same(_lib, "TargetMachine", _target_machine_enumeration)
|
---|
1195 |
|
---|
1196 | # TODO(jeanluc) _link defines the same value that gets moved to
|
---|
1197 | # ProjectReference. We may want to validate that they are consistent.
|
---|
1198 | _Moved(_lib, "LinkLibraryDependencies", "ProjectReference", _boolean)
|
---|
1199 |
|
---|
1200 | _MSBuildOnly(_lib, "DisplayLibrary", _string) # /LIST Visible='false'
|
---|
1201 | _MSBuildOnly(
|
---|
1202 | _lib,
|
---|
1203 | "ErrorReporting",
|
---|
1204 | _Enumeration(
|
---|
1205 | [],
|
---|
1206 | new=[
|
---|
1207 | "PromptImmediately", # /ERRORREPORT:PROMPT
|
---|
1208 | "QueueForNextLogin", # /ERRORREPORT:QUEUE
|
---|
1209 | "SendErrorReport", # /ERRORREPORT:SEND
|
---|
1210 | "NoErrorReport",
|
---|
1211 | ],
|
---|
1212 | ),
|
---|
1213 | ) # /ERRORREPORT:NONE
|
---|
1214 | _MSBuildOnly(_lib, "MinimumRequiredVersion", _string)
|
---|
1215 | _MSBuildOnly(_lib, "Name", _file_name) # /NAME
|
---|
1216 | _MSBuildOnly(_lib, "RemoveObjects", _file_list) # /REMOVE
|
---|
1217 | _MSBuildOnly(_lib, "SubSystem", _subsystem_enumeration)
|
---|
1218 | _MSBuildOnly(_lib, "TrackerLogDirectory", _folder_name)
|
---|
1219 | _MSBuildOnly(_lib, "TreatLibWarningAsErrors", _boolean) # /WX
|
---|
1220 | _MSBuildOnly(_lib, "Verbose", _boolean)
|
---|
1221 |
|
---|
1222 |
|
---|
1223 | # Directives for converting VCManifestTool to Mt.
|
---|
1224 | # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\mt.xml" for
|
---|
1225 | # the schema of the MSBuild Lib settings.
|
---|
1226 |
|
---|
1227 | # Options that have the same name in MSVS and MSBuild
|
---|
1228 | _Same(_manifest, "AdditionalManifestFiles", _file_list) # /manifest
|
---|
1229 | _Same(_manifest, "AdditionalOptions", _string_list)
|
---|
1230 | _Same(_manifest, "AssemblyIdentity", _string) # /identity:
|
---|
1231 | _Same(_manifest, "ComponentFileName", _file_name) # /dll
|
---|
1232 | _Same(_manifest, "GenerateCatalogFiles", _boolean) # /makecdfs
|
---|
1233 | _Same(_manifest, "InputResourceManifests", _string) # /inputresource
|
---|
1234 | _Same(_manifest, "OutputManifestFile", _file_name) # /out
|
---|
1235 | _Same(_manifest, "RegistrarScriptFile", _file_name) # /rgs
|
---|
1236 | _Same(_manifest, "ReplacementsFile", _file_name) # /replacements
|
---|
1237 | _Same(_manifest, "SuppressStartupBanner", _boolean) # /nologo
|
---|
1238 | _Same(_manifest, "TypeLibraryFile", _file_name) # /tlb:
|
---|
1239 | _Same(_manifest, "UpdateFileHashes", _boolean) # /hashupdate
|
---|
1240 | _Same(_manifest, "UpdateFileHashesSearchPath", _file_name)
|
---|
1241 | _Same(_manifest, "VerboseOutput", _boolean) # /verbose
|
---|
1242 |
|
---|
1243 | # Options that have moved location.
|
---|
1244 | _MovedAndRenamed(
|
---|
1245 | _manifest,
|
---|
1246 | "ManifestResourceFile",
|
---|
1247 | "ManifestResourceCompile",
|
---|
1248 | "ResourceOutputFileName",
|
---|
1249 | _file_name,
|
---|
1250 | )
|
---|
1251 | _Moved(_manifest, "EmbedManifest", "", _boolean)
|
---|
1252 |
|
---|
1253 | # MSVS options not found in MSBuild.
|
---|
1254 | _MSVSOnly(_manifest, "DependencyInformationFile", _file_name)
|
---|
1255 | _MSVSOnly(_manifest, "UseFAT32Workaround", _boolean)
|
---|
1256 | _MSVSOnly(_manifest, "UseUnicodeResponseFiles", _boolean)
|
---|
1257 |
|
---|
1258 | # MSBuild options not found in MSVS.
|
---|
1259 | _MSBuildOnly(_manifest, "EnableDPIAwareness", _boolean)
|
---|
1260 | _MSBuildOnly(_manifest, "GenerateCategoryTags", _boolean) # /category
|
---|
1261 | _MSBuildOnly(
|
---|
1262 | _manifest, "ManifestFromManagedAssembly", _file_name
|
---|
1263 | ) # /managedassemblyname
|
---|
1264 | _MSBuildOnly(_manifest, "OutputResourceManifests", _string) # /outputresource
|
---|
1265 | _MSBuildOnly(_manifest, "SuppressDependencyElement", _boolean) # /nodependency
|
---|
1266 | _MSBuildOnly(_manifest, "TrackerLogDirectory", _folder_name)
|
---|
1267 |
|
---|
1268 |
|
---|
1269 | # Directives for MASM.
|
---|
1270 | # See "$(VCTargetsPath)\BuildCustomizations\masm.xml" for the schema of the
|
---|
1271 | # MSBuild MASM settings.
|
---|
1272 |
|
---|
1273 | # Options that have the same name in MSVS and MSBuild.
|
---|
1274 | _Same(_masm, "UseSafeExceptionHandlers", _boolean) # /safeseh
|
---|