diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2020-06-05 20:30:12 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-06-06 08:59:52 +0200 |
commit | 3475fed714f97d9979807802d31de6d9a8055325 (patch) | |
tree | 7f0467dc0c6ff3524140aa5c55d4179ed1e772c8 /source/d/rust/rust.llvm10.7a14f9ed4fa60f4d8fc042fc678c80c14a850dc0.patch | |
parent | 5f94bdced2b5c15a0ed7e9950fa9a1815a2fb714 (diff) | |
download | current-3475fed714f97d9979807802d31de6d9a8055325.tar.gz current-3475fed714f97d9979807802d31de6d9a8055325.tar.xz |
Fri Jun 5 20:30:12 UTC 202020200605203012
ap/cups-filters-1.27.5-x86_64-1.txz: Upgraded.
ap/dash-0.5.11-x86_64-1.txz: Upgraded.
d/rust-1.44.0-x86_64-1.txz: Upgraded.
l/librsvg-2.48.7-x86_64-1.txz: Upgraded.
n/ethtool-5.7-x86_64-1.txz: Upgraded.
x/xkeyboard-config-2.30-noarch-1.txz: Upgraded.
Diffstat (limited to 'source/d/rust/rust.llvm10.7a14f9ed4fa60f4d8fc042fc678c80c14a850dc0.patch')
-rw-r--r-- | source/d/rust/rust.llvm10.7a14f9ed4fa60f4d8fc042fc678c80c14a850dc0.patch | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/source/d/rust/rust.llvm10.7a14f9ed4fa60f4d8fc042fc678c80c14a850dc0.patch b/source/d/rust/rust.llvm10.7a14f9ed4fa60f4d8fc042fc678c80c14a850dc0.patch deleted file mode 100644 index 5394aff2d..000000000 --- a/source/d/rust/rust.llvm10.7a14f9ed4fa60f4d8fc042fc678c80c14a850dc0.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 7a14f9ed4fa60f4d8fc042fc678c80c14a850dc0 Mon Sep 17 00:00:00 2001 -From: Nikita Popov <nikita.ppv@gmail.com> -Date: Sat, 18 Jan 2020 23:00:30 +0100 -Subject: [PATCH] Fix LLVM version handling in compiletest - -Convert version string to integer before comparing. Otherwise -we get into trouble with double digit versions ;) ---- - src/tools/compiletest/src/header.rs | 27 ++++++++++++++++++----- - src/tools/compiletest/src/header/tests.rs | 5 ++--- - 2 files changed, 23 insertions(+), 9 deletions(-) - -diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs -index 2a24a8c3c9485..cb648db8830ef 100644 ---- a/src/tools/compiletest/src/header.rs -+++ b/src/tools/compiletest/src/header.rs -@@ -191,6 +191,7 @@ impl EarlyProps { - return true; - } - if let Some(ref actual_version) = config.llvm_version { -+ let actual_version = version_to_int(actual_version); - if line.starts_with("min-llvm-version") { - let min_version = line - .trim_end() -@@ -199,7 +200,7 @@ impl EarlyProps { - .expect("Malformed llvm version directive"); - // Ignore if actual version is smaller the minimum required - // version -- &actual_version[..] < min_version -+ actual_version < version_to_int(min_version) - } else if line.starts_with("min-system-llvm-version") { - let min_version = line - .trim_end() -@@ -208,7 +209,7 @@ impl EarlyProps { - .expect("Malformed llvm version directive"); - // Ignore if using system LLVM and actual version - // is smaller the minimum required version -- config.system_llvm && &actual_version[..] < min_version -+ config.system_llvm && actual_version < version_to_int(min_version) - } else if line.starts_with("ignore-llvm-version") { - // Syntax is: "ignore-llvm-version <version1> [- <version2>]" - let range_components = line -@@ -219,15 +220,15 @@ impl EarlyProps { - .take(3) // 3 or more = invalid, so take at most 3. - .collect::<Vec<&str>>(); - match range_components.len() { -- 1 => &actual_version[..] == range_components[0], -+ 1 => actual_version == version_to_int(range_components[0]), - 2 => { -- let v_min = range_components[0]; -- let v_max = range_components[1]; -+ let v_min = version_to_int(range_components[0]); -+ let v_max = version_to_int(range_components[1]); - if v_max < v_min { - panic!("Malformed LLVM version range: max < min") - } - // Ignore if version lies inside of range. -- &actual_version[..] >= v_min && &actual_version[..] <= v_max -+ actual_version >= v_min && actual_version <= v_max - } - _ => panic!("Malformed LLVM version directive"), - } -@@ -238,6 +239,20 @@ impl EarlyProps { - false - } - } -+ -+ fn version_to_int(version: &str) -> u32 { -+ let version_without_suffix = version.split('-').next().unwrap(); -+ let components: Vec<u32> = version_without_suffix -+ .split('.') -+ .map(|s| s.parse().expect("Malformed version component")) -+ .collect(); -+ match components.len() { -+ 1 => components[0] * 10000, -+ 2 => components[0] * 10000 + components[1] * 100, -+ 3 => components[0] * 10000 + components[1] * 100 + components[2], -+ _ => panic!("Malformed version"), -+ } -+ } - } - } - -diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs -index 6c478f7e29da4..31d991e0c2f87 100644 ---- a/src/tools/compiletest/src/header/tests.rs -+++ b/src/tools/compiletest/src/header/tests.rs -@@ -122,9 +122,8 @@ fn llvm_version() { - config.llvm_version = Some("9.3.1-rust-1.43.0-dev".to_owned()); - assert!(!parse_rs(&config, "// min-llvm-version 9.2").ignore); - -- // FIXME. -- // config.llvm_version = Some("10.0.0-rust".to_owned()); -- // assert!(!parse_rs(&config, "// min-llvm-version 9.0").ignore); -+ config.llvm_version = Some("10.0.0-rust".to_owned()); -+ assert!(!parse_rs(&config, "// min-llvm-version 9.0").ignore); - } - - #[test] - |