diff --git a/pylib/gyp/easy_xml_test.py b/pylib/gyp/easy_xml_test.py
index 342f693a..c5808b84 100755
--- a/pylib/gyp/easy_xml_test.py
+++ b/pylib/gyp/easy_xml_test.py
@@ -76,6 +76,7 @@ def test_EasyXml_complex(self):
'\'Debug|Win32\'" Label="Configuration">'
"Application"
"Unicode"
+ "SpectreLoadCF"
""
""
)
@@ -99,6 +100,7 @@ def test_EasyXml_complex(self):
},
["ConfigurationType", "Application"],
["CharacterSet", "Unicode"],
+ ["SpectreMitigation", "SpectreLoadCF"]
],
]
)
diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
index 72269bdc..85c354f7 100644
--- a/pylib/gyp/generator/msvs.py
+++ b/pylib/gyp/generator/msvs.py
@@ -3006,6 +3006,10 @@ def _GetMSBuildConfigurationDetails(spec, build_file):
character_set = msbuild_attributes.get("CharacterSet")
config_type = msbuild_attributes.get("ConfigurationType")
_AddConditionalProperty(properties, condition, "ConfigurationType", config_type)
+ spectre_mitigation = msbuild_attributes.get('SpectreMitigation')
+ if spectre_mitigation:
+ _AddConditionalProperty(properties, condition, "SpectreMitigation",
+ spectre_mitigation)
if config_type == "Driver":
_AddConditionalProperty(properties, condition, "DriverType", "WDM")
_AddConditionalProperty(
@@ -3094,6 +3098,8 @@ def _ConvertMSVSBuildAttributes(spec, config, build_file):
msbuild_attributes[a] = _ConvertMSVSCharacterSet(msvs_attributes[a])
elif a == "ConfigurationType":
msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a])
+ elif a == "SpectreMitigation":
+ msbuild_attributes[a] = msvs_attributes[a]
else:
print("Warning: Do not know how to convert MSVS attribute " + a)
return msbuild_attributes