We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc05da6 commit 2268222Copy full SHA for 2268222
build.rs
@@ -3,11 +3,10 @@ extern crate autocfg;
3
use std::env;
4
5
fn main() {
6
- let ac = autocfg::new();
7
- if ac.probe_type("i128") {
8
- println!("cargo:rustc-cfg=has_i128");
9
- } else if env::var_os("CARGO_FEATURE_I128").is_some() {
10
- panic!("i128 support was not detected!");
+ // If the "i128" feature is explicity requested, don't bother probing for it.
+ // It will still cause a build error if that was set improperly.
+ if env::var_os("CARGO_FEATURE_I128").is_some() || autocfg::new().probe_type("i128") {
+ autocfg::emit("has_i128");
11
}
12
13
autocfg::rerun_path("build.rs");
0 commit comments