build.rs 312 B

1234567891011121314
  1. extern crate autocfg;
  2. use std::env;
  3. fn main() {
  4. let ac = autocfg::new();
  5. if ac.probe_type("i128") {
  6. println!("cargo:rustc-cfg=has_i128");
  7. } else if env::var_os("CARGO_FEATURE_I128").is_some() {
  8. panic!("i128 support was not detected!");
  9. }
  10. autocfg::rerun_path("build.rs");
  11. }