Bug 1730397 - Update packed_simd to a version that supports rustc >= 1.56. r=hsivonen

Differential Revision: https://phabricator.services.mozilla.com/D125604
This commit is contained in:
Mike Hommey 2021-09-17 08:55:04 +00:00
Родитель 75a698285e
Коммит 23c14710ec
7 изменённых файлов: 36 добавлений и 5 удалений

Просмотреть файл

@ -69,7 +69,7 @@ rev = "746743227485a83123784df0c53227ab466612ed"
[source."https://github.com/hsivonen/packed_simd"]
git = "https://github.com/hsivonen/packed_simd"
replace-with = "vendored-sources"
rev = "6a16f954950401b92b4e220fbf2dfaf6f00e1fb2"
rev = "8b4bd7d8229660a749dbe419a57ea01df9de5453"
[source."https://github.com/hsivonen/chardetng_c"]
git = "https://github.com/hsivonen/chardetng_c"

3
Cargo.lock сгенерированный
Просмотреть файл

@ -3573,9 +3573,10 @@ dependencies = [
[[package]]
name = "packed_simd"
version = "0.3.4"
source = "git+https://github.com/hsivonen/packed_simd?rev=6a16f954950401b92b4e220fbf2dfaf6f00e1fb2#6a16f954950401b92b4e220fbf2dfaf6f00e1fb2"
source = "git+https://github.com/hsivonen/packed_simd?rev=8b4bd7d8229660a749dbe419a57ea01df9de5453#8b4bd7d8229660a749dbe419a57ea01df9de5453"
dependencies = [
"cfg-if 0.1.10",
"rustc_version",
]
[[package]]

Просмотреть файл

@ -81,7 +81,7 @@ opt-level = 2
chardetng = { git = "https://github.com/hsivonen/chardetng", rev="302c995f91f44cf26e77dc4758ad56c3ff0153ad" }
chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" }
libudev-sys = { path = "dom/webauthn/libudev-sys" }
packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="6a16f954950401b92b4e220fbf2dfaf6f00e1fb2" }
packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="8b4bd7d8229660a749dbe419a57ea01df9de5453" }
minidump_writer_linux = { git = "https://github.com/msirringhaus/minidump_writer_linux.git", rev = "029ac0d54b237f27dc7d8d4e51bc0fb076e5e852" }
# The following overrides point to dummy projects, as a temporary measure until this is resolved:
# https://github.com/rust-lang/cargo/issues/6179

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

3
third_party/rust/packed_simd/Cargo.toml поставляемый
Просмотреть файл

@ -29,6 +29,9 @@ default = []
into_bits = []
libcore_neon = []
[build-dependencies]
rustc_version = "0.2"
[dev-dependencies]
paste = "^0.1.3"
arrayvec = { version = "^0.5", default-features = false }

26
third_party/rust/packed_simd/build.rs поставляемый
Просмотреть файл

@ -1,3 +1,5 @@
use rustc_version::{version_meta, Channel, Version};
fn main() {
println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
let target = std::env::var("TARGET")
@ -5,4 +7,28 @@ fn main() {
if target.contains("neon") {
println!("cargo:rustc-cfg=libcore_neon");
}
let ver_meta = version_meta().unwrap();
let old_const_generics =
if ver_meta.semver < Version::parse("1.56.0-alpha").unwrap() {
true
} else if ver_meta.semver >= Version::parse("1.57.0-alpha").unwrap() {
false
} else {
match ver_meta.channel {
Channel::Stable | Channel::Beta => false,
Channel::Nightly | Channel::Dev
if ver_meta
.commit_date
.as_deref()
.map(|d| d < "2021-08-31")
.unwrap_or(false) =>
{
true
}
_ => false,
}
};
if old_const_generics {
println!("cargo:rustc-cfg=const_generics");
}
}

3
third_party/rust/packed_simd/src/lib.rs поставляемый
Просмотреть файл

@ -199,8 +199,9 @@
//! Numeric casts are not very "precise": sometimes lossy, sometimes value
//! preserving, etc.
#![cfg_attr(const_generics, feature(const_generics))]
#![cfg_attr(not(const_generics), feature(adt_const_params))]
#![feature(
const_generics,
repr_simd,
rustc_attrs,
platform_intrinsics,