Add debuginfo flags for msvc assemblers

When code is being built with debuginfo, we need to instruct the
assemblers accordingly.
This commit is contained in:
Simonas Kazlauskas
2022-10-31 23:56:21 +02:00
parent df53498a16
commit e9998db315
+8
View File
@@ -1961,8 +1961,16 @@ impl Build {
cmd.arg("-I").arg(directory);
}
if target.contains("aarch64") || target.contains("arm") {
if self.get_debug() {
cmd.arg("-g");
}
println!("cargo:warning=The MSVC ARM assemblers do not support -D flags");
} else {
if self.get_debug() {
cmd.arg("-Zi");
}
for &(ref key, ref value) in self.definitions.iter() {
if let Some(ref value) = *value {
cmd.arg(&format!("-D{}={}", key, value));