summaryrefslogtreecommitdiffstats
path: root/vendor/iana-time-zone-haiku/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/iana-time-zone-haiku/build.rs')
-rw-r--r--vendor/iana-time-zone-haiku/build.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/iana-time-zone-haiku/build.rs b/vendor/iana-time-zone-haiku/build.rs
new file mode 100644
index 000000000..085e8d0bc
--- /dev/null
+++ b/vendor/iana-time-zone-haiku/build.rs
@@ -0,0 +1,20 @@
+use std::env;
+
+fn main() {
+ cxx_build::bridge("src/lib.rs")
+ .file("src/implementation.cc")
+ .flag_if_supported("-std=c++11")
+ .compile("tz_haiku");
+
+ println!("cargo:rerun-if-changed=src/lib.rs");
+ println!("cargo:rerun-if-changed=src/implementation.cc");
+ println!("cargo:rerun-if-changed=src/interface.h");
+
+ let target = env::var_os("TARGET").expect("cargo should set TARGET env var");
+ let target = target
+ .to_str()
+ .expect("TARGET env var should be valid UTF-8");
+ if target.contains("haiku") {
+ println!("cargo:rustc-link-lib=be");
+ }
+}