aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/build.rs
diff options
context:
space:
mode:
authorFenrir <[email protected]>2018-08-19 17:48:00 -0600
committerFenrir <[email protected]>2018-08-19 17:56:18 -0600
commit5d28bfcfd6086c3328837de9695099ea39048d0d (patch)
treea514fde042ff2a504a03305bfe0894ff8cd8d47e /ctr-std/src/build.rs
parentUpdate for latest nightly 2018-06-09 (#70) (diff)
downloadctru-rs-5d28bfcfd6086c3328837de9695099ea39048d0d.tar.xz
ctru-rs-5d28bfcfd6086c3328837de9695099ea39048d0d.zip
Update for nightly-2018-08-18
Diffstat (limited to 'ctr-std/src/build.rs')
-rw-r--r--ctr-std/src/build.rs11
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");