mirror of
https://github.com/openharmony/third_party_rust_cc-rs.git
synced 2026-07-01 23:04:09 -04:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user