!65 fix compilation error for version 1.57.0

From: @j_zhengli 
Reviewed-by: @jingxiaolu 
Signed-off-by: @jingxiaolu
This commit is contained in:
openeuler-ci-bot 2022-02-14 01:13:25 +00:00 committed by Gitee
commit a0230e59cb
2 changed files with 22 additions and 7 deletions

View File

@ -0,0 +1,10 @@
--- a/src/bootstrap/lib.rs
+++ a/src/bootstrap/lib.rs
@@ -273,6 +273,7 @@
RefCell<HashMap<TargetSelection, HashMap<String, (&'static str, PathBuf, Vec<String>)>>>,
}
+#[allow(dead_code)]
#[derive(Debug)]
struct Crate {
name: Interned<String>,

View File

@ -12,7 +12,7 @@
%bcond_without lldb %bcond_without lldb
Name: rust Name: rust
Version: 1.57.0 Version: 1.57.0
Release: 1 Release: 2
Summary: The Rust Programming Language Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT) License: (ASL 2.0 or MIT) and (BSD and MIT)
URL: https://www.rust-lang.org URL: https://www.rust-lang.org
@ -29,6 +29,7 @@ Patch0001: rustc-1.56.0-disable-http2.patch
Patch0002: clippy-driver-usage-should-user-friendly.patch Patch0002: clippy-driver-usage-should-user-friendly.patch
Patch0003: cargo-help-clippy-should-have-description-to-user.patch Patch0003: cargo-help-clippy-should-have-description-to-user.patch
Patch0004: fix-a-println-wrong-format.patch Patch0004: fix-a-println-wrong-format.patch
Patch0005: omit-bootstrap-lib-deadcode-warning.patch
%{lua: function rust_triple(arch) %{lua: function rust_triple(arch)
local abi = "gnu" local abi = "gnu"
if arch == "armv7hl" then if arch == "armv7hl" then
@ -249,6 +250,7 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
%patch0002 -p1 %patch0002 -p1
%patch0003 -p1 %patch0003 -p1
%patch0004 -p1 %patch0004 -p1
%patch0005 -p1
rm -rf vendor/curl-sys/curl/ rm -rf vendor/curl-sys/curl/
rm -rf vendor/jemalloc-sys/jemalloc/ rm -rf vendor/jemalloc-sys/jemalloc/
rm -rf vendor/libssh2-sys/libssh2/ rm -rf vendor/libssh2-sys/libssh2/
@ -464,6 +466,9 @@ export %{rust_env}
%{_mandir}/man1/cargo*.1* %{_mandir}/man1/cargo*.1*
%changelog %changelog
* Wed Feb 09 2022 Li Zheng <lizheng135@huawei.com> - 1.57.0-2
- Fix build error
* Sat Jan 22 2022 Liu Zixian <liuzixian4@huawei.com> - 1.57.0-1 * Sat Jan 22 2022 Liu Zixian <liuzixian4@huawei.com> - 1.57.0-1
- Update to 1.57.0 - Update to 1.57.0
@ -497,19 +502,19 @@ export %{rust_env}
* Wed Aug 04 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.51.0-7 * Wed Aug 04 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.51.0-7
- DESC: delete BuildRequires gdb - DESC: delete BuildRequires gdb
* Thu 08 Jul 2021 Jiajie Li <lijiajie11@huawei.com> - 1.51.0-6 * Thu Jul 08 2021 Jiajie Li <lijiajie11@huawei.com> - 1.51.0-6
- Add build require of ninja and llvm - Add build require of ninja and llvm
* Thu 01 Jul 2021 Jiajie Li <lijiajie11@huawei.com> - 1.51.0-5 * Thu Jul 01 2021 Jiajie Li <lijiajie11@huawei.com> - 1.51.0-5
- Add support for musl target - Add support for musl target
* Thu 24 Jun 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-4 * Thu Jun 24 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-4
- fix a println wrong format - fix a println wrong format
* Thu 24 Jun 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-3 * Thu Jun 24 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-3
- cargo help clippy should have description to user - cargo help clippy should have description to user
* Wed 23 Jun 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-2 * Wed Jun 23 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-2
- clippy-driver usage should user friendly - clippy-driver usage should user friendly
* Fri May 07 2021 wangyue <wangyue92@huawei.com> - 1.51.0-1 * Fri May 07 2021 wangyue <wangyue92@huawei.com> - 1.51.0-1
@ -521,7 +526,7 @@ export %{rust_env}
* Mon Sep 21 2020 Jeffery.Gao <gaojianxing@huawei.com> - 1.45.2-1 * Mon Sep 21 2020 Jeffery.Gao <gaojianxing@huawei.com> - 1.45.2-1
- Update to 1.45.2 - Update to 1.45.2
* Mon Apr 17 2020 zhujunhao <zhujunhao8@huawei.com> - 1.29.1-4 * Fri Apr 17 2020 zhujunhao <zhujunhao8@huawei.com> - 1.29.1-4
- add llvm in rust - add llvm in rust
* Thu Dec 5 2019 wutao <wutao61@huawei.com> - 1.29.1-3 * Thu Dec 5 2019 wutao <wutao61@huawei.com> - 1.29.1-3