Lines Matching +full:rust +full:- +full:version
6 // List of cfgs this build script is allowed to set. The list is needed to support check-cfg, as we
35 // Extra values to allow for check-cfg.
46 // Avoid unnecessary re-building. in main()
47 println!("cargo:rerun-if-changed=build.rs"); in main()
66 // On CI, we detect the actual FreeBSD version and match its ABI exactly, in main()
80 // Non-Emscripten or version < 3.1.42. in main()
89 // Rust >= 1.15 supports private module use: in main()
94 // Rust >= 1.19 supports unions: in main()
99 // Rust >= 1.24 supports const mem::size_of: in main()
104 // Rust >= 1.25 supports repr(align): in main()
109 // Rust >= 1.26 supports i128 and u128: in main()
114 // Rust >= 1.30 supports `core::ffi::c_void`, so libc can just re-export it. in main()
116 // backwards-compatibility. in main()
121 // Rust >= 1.33 supports repr(packed(N)) and cfg(target_vendor). in main()
127 // Rust >= 1.40 supports #[non_exhaustive]. in main()
132 // Rust >= 1.47 supports long array: in main()
141 // Rust >= 1.37.0 allows underscores as anonymous constant names. in main()
151 // Rust >= 1.62.0 allows to use `const_extern_fn` for "Rust" and "C". in main()
155 // Rust < 1.62.0 requires a crate feature and feature gate. in main()
158 panic!("const-extern-fn requires a nightly compiler >= 1.40"); in main()
165 // check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the in main()
167 // rust-lang/rust enforces it, this is useful when using a custom libc fork there. in main()
169 // https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg in main()
173 println!("cargo:rustc-check-cfg=cfg({})", cfg); in main()
175 println!("cargo:rustc-check-cfg=values({})", cfg); in main()
181 println!("cargo:rustc-check-cfg=cfg({},values(\"{}\"))", name, values); in main()
183 println!("cargo:rustc-check-cfg=values({},\"{}\")", name, values); in main()
189 fn rustc_minor_nightly() -> (u32, bool) { in rustc_minor_nightly()
194 None => panic!("Failed to get rustc version"), in rustc_minor_nightly()
201 .arg("--version") in rustc_minor_nightly()
204 .expect("Failed to get rustc version"); in rustc_minor_nightly()
212 let version = otry!(str::from_utf8(&output.stdout).ok()); in rustc_minor_nightly() localVariable
213 let mut pieces = version.split('.'); in rustc_minor_nightly()
216 panic!("Failed to get rustc version"); in rustc_minor_nightly()
221 // If `rustc` was built from a tarball, its version string in rustc_minor_nightly()
223 // (e.g. "rustc 1.39.0"). Treat this case as non-nightly, in rustc_minor_nightly()
226 let nightly_raw = otry!(pieces.next()).split('-').nth(1); in rustc_minor_nightly()
235 fn which_freebsd() -> Option<i32> { in which_freebsd()
236 let output = std::process::Command::new("freebsd-version").output().ok(); in which_freebsd()
262 fn emcc_version_code() -> Option<u64> { in emcc_version_code()
264 .arg("-dumpversion") in emcc_version_code()
279 let version = stdout.unwrap(); in emcc_version_code() localVariable
281 // Some Emscripten versions come with `-git` attached, so split the in emcc_version_code()
282 // version string also on the `-` char. in emcc_version_code()
283 let mut pieces = version.trim().split(|c| c == '.' || c == '-'); in emcc_version_code()
296 println!("cargo:rustc-cfg={}", cfg); in set_cfg()