diff --git a/Cargo.lock b/Cargo.lock index 6e20010..40a0004 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -580,7 +580,7 @@ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "microfetch" -version = "1.2.2" +version = "1.2.3" dependencies = [ "microfetch-asm", "microfetch-lib", @@ -588,11 +588,11 @@ dependencies = [ [[package]] name = "microfetch-asm" -version = "1.2.2" +version = "1.2.3" [[package]] name = "microfetch-bench" -version = "1.2.2" +version = "1.2.3" dependencies = [ "criterion", "hotpath", @@ -601,7 +601,7 @@ dependencies = [ [[package]] name = "microfetch-lib" -version = "1.2.2" +version = "1.2.3" dependencies = [ "hotpath", "microfetch-asm", diff --git a/Cargo.toml b/Cargo.toml index b8c3e27..9dbb650 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,11 +29,11 @@ edition = "2024" license = "GPL-3.0" repository = "https://github.com/notashelf/microfetch" rust-version = "1.95.0" -version = "1.2.2" +version = "1.2.3" [workspace.dependencies] -microfetch-asm = { path = "./crates/asm", version = "1.2.2" } -microfetch-lib = { path = "./crates/lib", version = "1.2.2" } +microfetch-asm = { path = "./crates/asm", version = "1.2.3" } +microfetch-lib = { path = "./crates/lib", version = "1.2.3" } criterion = { default-features = false, features = [ "cargo_bench_support" ], version = "0.8.2" } diff --git a/build.rs b/build.rs index b329cd1..cdb9e27 100644 --- a/build.rs +++ b/build.rs @@ -34,13 +34,15 @@ fn main() -> io::Result<()> { // Remove unreferenced input sections println!("cargo:rustc-link-arg-bin=microfetch=-Wl,--gc-sections"); // Strip all symbol table entries - if env::var("DEBUG").as_deref() != Ok("true") { + let debug = env::var("DEBUG").as_deref() == Ok("true"); + if !debug { println!("cargo:rustc-link-arg-bin=microfetch=-Wl,--strip-all"); } + // Omit the .note.gnu.build-id section, which split debug info is found by + let build_id = if debug { "sha1" } else { "none" }; + println!("cargo:rustc-link-arg-bin=microfetch=-Wl,--build-id={build_id}"); // Nothing unwinds with panic=abort, so skip the unwinder's lookup table println!("cargo:rustc-link-arg-bin=microfetch=-Wl,--no-eh-frame-hdr"); - // Omit the .note.gnu.build-id section - println!("cargo:rustc-link-arg-bin=microfetch=-Wl,--build-id=none"); // Disable RELRO (removes relro_padding) println!("cargo:rustc-link-arg-bin=microfetch=-Wl,-z,norelro");