Ticket #15634: seamonkey-2.53.9.1-rustc_1560-1.patch

File seamonkey-2.53.9.1-rustc_1560-1.patch, 3.2 KB (added by Douglas R. Reno, 2 years ago)
  • seamonkey-2.53.9.1

    diff -Naurp seamonkey-2.53.9.1.orig/.cargo/config.in seamonkey-2.53.9.1/.cargo/config.in
    old new replace-with = 'vendored-sources'  
    55[source."https://github.com/hsivonen/packed_simd"]
    66git = "https://github.com/hsivonen/packed_simd"
    77replace-with = "vendored-sources"
    8 rev = "6a16f954950401b92b4e220fbf2dfaf6f00e1fb2"
     8rev = "8b4bd7d8229660a749dbe419a57ea01df9de5453"
    99
    1010[source.vendored-sources]
    1111directory = '@top_srcdir@/third_party/rust'
  • third_party/rust/packed_simd/build.rs

    diff -Naurp seamonkey-2.53.9.1.orig/third_party/rust/packed_simd/build.rs seamonkey-2.53.9.1/third_party/rust/packed_simd/build.rs
    old new  
     1use rustc_version::{version_meta, Channel, Version};
     2
    13fn main() {
    24    println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
    35    let target = std::env::var("TARGET")
    fn main() {  
    57    if target.contains("neon") {
    68        println!("cargo:rustc-cfg=libcore_neon");
    79    }
     10    let ver_meta = version_meta().unwrap();
     11    let old_const_generics =
     12        if ver_meta.semver < Version::parse("1.56.0-alpha").unwrap() {
     13            true
     14        } else if ver_meta.semver >= Version::parse("1.57.0-alpha").unwrap() {
     15            false
     16        } else {
     17            match ver_meta.channel {
     18                Channel::Stable | Channel::Beta => false,
     19                Channel::Nightly | Channel::Dev
     20                    if ver_meta
     21                        .commit_date
     22                        .as_deref()
     23                        .map(|d| d < "2021-08-31")
     24                        .unwrap_or(false) =>
     25                {
     26                    true
     27                }
     28                _ => false,
     29            }
     30        };
     31    if old_const_generics {
     32        println!("cargo:rustc-cfg=const_generics");
     33    }
    834}
  • third_party/rust/packed_simd/Cargo.toml

    diff -Naurp seamonkey-2.53.9.1.orig/third_party/rust/packed_simd/Cargo.toml seamonkey-2.53.9.1/third_party/rust/packed_simd/Cargo.toml
    old new default = []  
    2929into_bits = []
    3030libcore_neon = []
    3131
     32[build-dependencies]
     33rustc_version = "0.2"
     34
    3235[dev-dependencies]
    3336paste = "^0.1.3"
    3437arrayvec = { version = "^0.5", default-features = false }
  • third_party/rust/packed_simd/src/lib.rs

    diff -Naurp seamonkey-2.53.9.1.orig/third_party/rust/packed_simd/src/lib.rs seamonkey-2.53.9.1/third_party/rust/packed_simd/src/lib.rs
    old new  
    199199//!   Numeric casts are not very "precise": sometimes lossy, sometimes value
    200200//!   preserving, etc.
    201201
     202#![cfg_attr(const_generics, feature(const_generics))]
     203#![cfg_attr(not(const_generics, feature(adt_const_params))]
    202204#![feature(
    203     const_generics,
    204205    repr_simd,
    205206    rustc_attrs,
    206207    platform_intrinsics,