diff options
Diffstat (limited to 'ctr-std/src/build.rs')
| -rw-r--r-- | ctr-std/src/build.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ctr-std/src/build.rs b/ctr-std/src/build.rs index c001e4e..016e7ad 100644 --- a/ctr-std/src/build.rs +++ b/ctr-std/src/build.rs @@ -22,7 +22,6 @@ fn main() { if cfg!(feature = "backtrace") && !target.contains("cloudabi") && !target.contains("emscripten") && - !target.contains("fuchsia") && !target.contains("msvc") && !target.contains("wasm32") { @@ -68,10 +67,6 @@ fn main() { println!("cargo:rustc-link-lib=userenv"); println!("cargo:rustc-link-lib=shell32"); } else if target.contains("fuchsia") { - // use system-provided libbacktrace - if cfg!(feature = "backtrace") { - println!("cargo:rustc-link-lib=backtrace"); - } println!("cargo:rustc-link-lib=zircon"); println!("cargo:rustc-link-lib=fdio"); } else if target.contains("cloudabi") { @@ -109,7 +104,8 @@ fn build_libbacktrace(target: &str) -> Result<(), ()> { } else { build.file("../libbacktrace/elf.c"); - if target.contains("64") { + let pointer_width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap(); + if pointer_width == "64" { build.define("BACKTRACE_ELF_SIZE", "64"); } else { build.define("BACKTRACE_ELF_SIZE", "32"); @@ -126,7 +122,8 @@ fn build_libbacktrace(target: &str) -> Result<(), ()> { if !target.contains("apple-ios") && !target.contains("solaris") && !target.contains("redox") && - !target.contains("android") { + !target.contains("android") && + !target.contains("haiku") { build.define("HAVE_DL_ITERATE_PHDR", "1"); } build.define("_GNU_SOURCE", "1"); |