mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
7b58e2b833
because it's stable as of that version. Differential Revision: https://phabricator.services.mozilla.com/D147706
21 lines
777 B
Rust
21 lines
777 B
Rust
use rustc_version::{version, Version};
|
|
|
|
fn main() {
|
|
if cfg!(feature = "neon") && std::env::var_os("RUSTC_BOOTSTRAP").is_none() {
|
|
// With Rust 1.50 and newer RUSTC_BOOTSTAP should
|
|
// be set externally so we only set it if it's
|
|
// not already set.
|
|
println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
|
|
}
|
|
let target = std::env::var("TARGET").expect("TARGET environment variable not defined");
|
|
if target.contains("neon") {
|
|
println!("cargo:rustc-cfg=libcore_neon");
|
|
}
|
|
if version().unwrap() >= Version::parse("1.60.0-alpha").unwrap() {
|
|
println!("cargo:rustc-cfg=std_arch");
|
|
}
|
|
if version().unwrap() < Version::parse("1.61.0-alpha").unwrap() {
|
|
println!("cargo:rustc-cfg=aarch64_target_feature");
|
|
}
|
|
}
|