Skip to content

Commit

Permalink
Update targets for Rust 1.66 (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers authored Dec 19, 2022
1 parent d6f8a00 commit 8db9e4f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# `⚙️ cfg-expr`

**A parser and evaluator for Rust `cfg()` expressions. Targets as of [Rust 1.64.0](https://forge.rust-lang.org/release/platform-support.html) are supported.**
**A parser and evaluator for Rust `cfg()` expressions. Targets as of [Rust 1.66.0](https://forge.rust-lang.org/release/platform-support.html) are supported.**

[![Build Status](https://github.com/EmbarkStudios/cfg-expr/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/cfg-expr/actions?workflow=CI)
[![Crates.io](https://img.shields.io/crates/v/cfg-expr.svg)](https://crates.io/crates/cfg-expr)
Expand All @@ -22,7 +22,7 @@

`cfg-expr` is a crate that can be used to parse and evaluate Rust `cfg()` expressions, both as declarable in Rust code itself, as well in cargo manifests' `[target.'cfg()'.dependencies]` sections.

It contains a list of all builtin targets known to rustc as of `1.58.0` that can be used to determine if a particular cfg expression is satisfiable.
It contains a list of all builtin targets known to rustc as of `1.66.0` that can be used to determine if a particular cfg expression is satisfiable.

```rust
use cfg_expr::{targets::get_builtin_target_by_triple, Expression, Predicate};
Expand Down
2 changes: 1 addition & 1 deletion src/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ pub fn get_builtin_target_by_triple(triple: &str) -> Option<&'static TargetInfo>
/// versions.
///
/// ```
/// assert_eq!("1.65.0", cfg_expr::targets::rustc_version());
/// assert_eq!("1.66.0", cfg_expr::targets::rustc_version());
/// ```
pub fn rustc_version() -> &'static str {
builtins::RUSTC_VERSION
Expand Down
28 changes: 27 additions & 1 deletion src/targets/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use super::*;

pub(crate) const RUSTC_VERSION: &str = "1.65.0";
pub(crate) const RUSTC_VERSION: &str = "1.66.0";

pub const ALL_BUILTINS: &[TargetInfo] = &[
TargetInfo {
Expand Down Expand Up @@ -507,6 +507,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[
has_atomics: HasAtomics::atomic_8_16_32_ptr,
panic: Panic::unwind,
},
TargetInfo {
triple: Triple::new_const("armv5te-none-eabi"),
os: None,
abi: None,
arch: Arch::arm,
env: None,
vendor: Some(Vendor::unknown),
families: Families::new_const(&[]),
pointer_width: 32,
endian: Endian::little,
has_atomics: HasAtomics::new_const(&[]),
panic: Panic::abort,
},
TargetInfo {
triple: Triple::new_const("armv5te-unknown-linux-gnueabi"),
os: Some(Os::linux),
Expand Down Expand Up @@ -1885,6 +1898,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[
has_atomics: HasAtomics::new_const(&[]),
panic: Panic::abort,
},
TargetInfo {
triple: Triple::new_const("thumbv5te-none-eabi"),
os: None,
abi: None,
arch: Arch::arm,
env: None,
vendor: Some(Vendor::unknown),
families: Families::new_const(&[]),
pointer_width: 32,
endian: Endian::little,
has_atomics: HasAtomics::new_const(&[]),
panic: Panic::abort,
},
TargetInfo {
triple: Triple::new_const("thumbv6m-none-eabi"),
os: None,
Expand Down

0 comments on commit 8db9e4f

Please sign in to comment.