Skip to content

Commit

Permalink
Fixup (#18)
Browse files Browse the repository at this point in the history
* Fix deny

* Update builtin target list to 1.50.0

* Add special case for armv5te-unknown-linux-uclibceabi

Needs bytecodealliance/target-lexicon#68 to be merged and released

* Update CHANGELOG
  • Loading branch information
Jake-Shadle authored Feb 12, 2021
1 parent 61f1162 commit f868985
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 78 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [Unreleased] - ReleaseDate
### Changed
- Updated the builtin target list to Rust 1.50.0. Again, somewhat of a breaking change as many targets were removed or changed.

### Fixed
- Update smallvec to fix an [advisory](https://rustsec.org/advisories/RUSTSEC-2021-0003)

## [0.6.0] - 2021-01-04
### Changed
- Updated the builtin target list to Rust 1.49.0, this is somewhat of a breaking change, as rustc now considers all `android` targets to have the `gnu` environment, where previously, it was unspecified.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default = []
targets = ["target-lexicon"]

[dependencies]
smallvec = "1.4"
smallvec = "1.6"
target-lexicon = { version = "0.11", optional = true }

[dev-dependencies]
Expand Down
4 changes: 4 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
vulnerability = "deny"
unmaintained = "deny"
notice = "deny"
ignore = [
# difference is unmaintained
"RUSTSEC-2020-0095",
]

[bans]
multiple-versions = "deny"
Expand Down
107 changes: 43 additions & 64 deletions 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.49.0";
pub(crate) const RUSTC_VERSION: &str = "1.50.0";

pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
TargetInfo {
Expand All @@ -33,6 +33,16 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
pointer_width: 64,
endian: Endian::little,
},
TargetInfo {
triple: "aarch64-apple-ios-macabi",
os: Some(Os::ios),
arch: Arch::aarch64,
env: None,
vendor: Some(Vendor::apple),
family: Some(Family::unix),
pointer_width: 64,
endian: Endian::little,
},
TargetInfo {
triple: "aarch64-apple-tvos",
os: Some(Os::tvos),
Expand All @@ -48,7 +58,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: Some(Os::fuchsia),
arch: Arch::aarch64,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: Some(Family::unix),
pointer_width: 64,
endian: Endian::little,
Expand All @@ -73,16 +83,6 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
pointer_width: 64,
endian: Endian::little,
},
TargetInfo {
triple: "aarch64-unknown-cloudabi",
os: Some(Os::cloudabi),
arch: Arch::aarch64,
env: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 64,
endian: Endian::little,
},
TargetInfo {
triple: "aarch64-unknown-freebsd",
os: Some(Os::freebsd),
Expand Down Expand Up @@ -138,7 +138,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::aarch64,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 64,
endian: Endian::little,
Expand All @@ -148,7 +148,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::aarch64,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 64,
endian: Endian::little,
Expand Down Expand Up @@ -248,7 +248,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::big,
Expand All @@ -258,7 +258,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::big,
Expand Down Expand Up @@ -293,6 +293,16 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
pointer_width: 32,
endian: Endian::little,
},
TargetInfo {
triple: "armv5te-unknown-linux-uclibceabi",
os: Some(Os::linux),
arch: Arch::arm,
env: Some(Env::uclibc),
vendor: Some(Vendor::unknown),
family: Some(Family::unix),
pointer_width: 32,
endian: Endian::little,
},
TargetInfo {
triple: "armv6-unknown-freebsd",
os: Some(Os::freebsd),
Expand Down Expand Up @@ -333,16 +343,6 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
pointer_width: 32,
endian: Endian::little,
},
TargetInfo {
triple: "armv7-unknown-cloudabi-eabihf",
os: Some(Os::cloudabi),
arch: Arch::arm,
env: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
},
TargetInfo {
triple: "armv7-unknown-freebsd",
os: Some(Os::freebsd),
Expand Down Expand Up @@ -418,7 +418,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -428,7 +428,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -438,7 +438,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -448,7 +448,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -475,7 +475,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
},
TargetInfo {
triple: "avr-unknown-gnu-atmega328",
os: Some(Os::unknown),
os: None,
arch: Arch::avr,
env: None,
vendor: Some(Vendor::unknown),
Expand Down Expand Up @@ -573,16 +573,6 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
pointer_width: 32,
endian: Endian::little,
},
TargetInfo {
triple: "i686-unknown-cloudabi",
os: Some(Os::cloudabi),
arch: Arch::x86,
env: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
},
TargetInfo {
triple: "i686-unknown-freebsd",
os: Some(Os::freebsd),
Expand Down Expand Up @@ -798,7 +788,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::mips,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand Down Expand Up @@ -848,7 +838,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::msp430,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 16,
endian: Endian::little,
Expand Down Expand Up @@ -1118,7 +1108,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -1128,7 +1118,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand Down Expand Up @@ -1158,7 +1148,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -1168,7 +1158,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -1178,7 +1168,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand Down Expand Up @@ -1218,7 +1208,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -1228,7 +1218,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand All @@ -1238,7 +1228,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: None,
arch: Arch::arm,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand Down Expand Up @@ -1268,7 +1258,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: Some(Os::wasi),
arch: Arch::wasm32,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 32,
endian: Endian::little,
Expand Down Expand Up @@ -1328,7 +1318,7 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
os: Some(Os::fuchsia),
arch: Arch::x86_64,
env: None,
vendor: None,
vendor: Some(Vendor::unknown),
family: Some(Family::unix),
pointer_width: 64,
endian: Endian::little,
Expand Down Expand Up @@ -1403,16 +1393,6 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
pointer_width: 64,
endian: Endian::little,
},
TargetInfo {
triple: "x86_64-unknown-cloudabi",
os: Some(Os::cloudabi),
arch: Arch::x86_64,
env: None,
vendor: Some(Vendor::unknown),
family: None,
pointer_width: 64,
endian: Endian::little,
},
TargetInfo {
triple: "x86_64-unknown-dragonfly",
os: Some(Os::dragonfly),
Expand Down Expand Up @@ -1621,7 +1601,6 @@ impl<'a> super::Vendor<'a> {

impl<'a> super::Os<'a> {
pub const android: Os<'static> = Os("android");
pub const cloudabi: Os<'static> = Os("cloudabi");
pub const cuda: Os<'static> = Os("cuda");
pub const dragonfly: Os<'static> = Os("dragonfly");
pub const emscripten: Os<'static> = Os("emscripten");
Expand Down
4 changes: 2 additions & 2 deletions src/targets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub fn get_builtin_target_by_triple(triple: &str) -> Option<&'static TargetInfo<
/// versions.
///
/// ```
/// assert_eq!("1.49.0", cfg_expr::targets::rustc_version());
/// assert_eq!("1.50.0", cfg_expr::targets::rustc_version());
/// ```
pub fn rustc_version() -> &'static str {
builtins::RUSTC_VERSION
Expand All @@ -173,7 +173,7 @@ mod test {
#[test]
fn has_ios() {
assert_eq!(
6,
7,
super::ALL_BUILTINS
.iter()
.filter(|ti| ti.os == Some(super::Os::ios))
Expand Down
Loading

0 comments on commit f868985

Please sign in to comment.