|
|
@@ -1468,6 +1468,10 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues(
|
|
|
if (this->IPOEnabledConfigurations.count(config) > 0) {
|
|
|
e1.Element("WholeProgramOptimization", "true");
|
|
|
}
|
|
|
+ if (this->ASanEnabledConfigurations.find(config) !=
|
|
|
+ this->ASanEnabledConfigurations.end()) {
|
|
|
+ e1.Element("EnableAsan", "true");
|
|
|
+ }
|
|
|
{
|
|
|
auto s = this->SpectreMitigation.find(config);
|
|
|
if (s != this->SpectreMitigation.end()) {
|
|
|
@@ -3075,6 +3079,11 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
|
|
this->IPOEnabledConfigurations.insert(configName);
|
|
|
}
|
|
|
|
|
|
+ // Check if ASan is enabled.
|
|
|
+ if (flags.find("/fsanitize=address") != std::string::npos) {
|
|
|
+ this->ASanEnabledConfigurations.insert(configName);
|
|
|
+ }
|
|
|
+
|
|
|
// Precompile Headers
|
|
|
std::string pchHeader =
|
|
|
this->GeneratorTarget->GetPchHeader(configName, linkLanguage);
|