Skip to content

Commit

Permalink
Manually add -gdwarf-3 to pin the dwarf version.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Mar 3, 2023
1 parent 98a4d68 commit e63f855
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.rs
Expand Up @@ -175,7 +175,14 @@ fn link_in_librustix_outline(arch: &str, asm_name: &str) {
#[cfg(feature = "cc")]
{
let out_dir = var("OUT_DIR").unwrap();
Build::new().file(&asm_name).compile(&name);
// Add `-gdwarf-3` so that we always get the same output, regardless
// of the Rust version we're using.
let mut build = Build::new();
if profile == "debug" {
build.flag("-gdwarf-3");
}
build.file(&asm_name);
build.compile(&name);
println!("cargo:rerun-if-changed={}", asm_name);
if std::fs::metadata(".git").is_ok() {
let from = format!("{}/lib{}.a", out_dir, name);
Expand Down
Binary file not shown.
Binary file modified src/backend/linux_raw/arch/outline/debug/librustix_outline_arm.a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/backend/linux_raw/arch/outline/debug/librustix_outline_x86.a
Binary file not shown.
Binary file not shown.

0 comments on commit e63f855

Please sign in to comment.