xref: /third_party/rust/crates/memoffset/build.rs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/memoffset/
160636f74Sopenharmony_ciextern crate autocfg;
260636f74Sopenharmony_ci
360636f74Sopenharmony_cifn main() {
460636f74Sopenharmony_ci    let ac = autocfg::new();
560636f74Sopenharmony_ci
660636f74Sopenharmony_ci    // Check for a minimum version for a few features
760636f74Sopenharmony_ci    if ac.probe_rustc_version(1, 20) {
860636f74Sopenharmony_ci        println!("cargo:rustc-cfg=tuple_ty");
960636f74Sopenharmony_ci    }
1060636f74Sopenharmony_ci    if ac.probe_rustc_version(1, 31) {
1160636f74Sopenharmony_ci        println!("cargo:rustc-cfg=allow_clippy");
1260636f74Sopenharmony_ci    }
1360636f74Sopenharmony_ci    if ac.probe_rustc_version(1, 36) {
1460636f74Sopenharmony_ci        println!("cargo:rustc-cfg=maybe_uninit");
1560636f74Sopenharmony_ci    }
1660636f74Sopenharmony_ci    if ac.probe_rustc_version(1, 40) {
1760636f74Sopenharmony_ci        println!("cargo:rustc-cfg=doctests");
1860636f74Sopenharmony_ci    }
1960636f74Sopenharmony_ci    if ac.probe_rustc_version(1, 51) {
2060636f74Sopenharmony_ci        println!("cargo:rustc-cfg=raw_ref_macros");
2160636f74Sopenharmony_ci    }
2260636f74Sopenharmony_ci    if ac.probe_rustc_version(1, 65) {
2360636f74Sopenharmony_ci        println!("cargo:rustc-cfg=stable_const");
2460636f74Sopenharmony_ci    }
2560636f74Sopenharmony_ci}
26

Indexes created Thu Nov 07 10:32:03 CST 2024