Skip to content

Commit

Permalink
Merge pull request #742 from nagisa/ml-debuginfo
Browse files Browse the repository at this point in the history
Add debuginfo flags for msvc assemblers
  • Loading branch information
ChrisDenton committed Nov 4, 2022
2 parents ad1f00d + c05e9d9 commit 66005c8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Expand Up @@ -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));
Expand Down

0 comments on commit 66005c8

Please sign in to comment.