Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pending on rust update] rust-analyzer: update to 2021.05.24. #31085

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 4 additions & 8 deletions common/hooks/post-install/06-strip-and-debug-pkgs.sh
Expand Up @@ -86,16 +86,14 @@ hook() {
chmod +w "$f"
if [[ $(file $f) =~ "statically linked" ]]; then
# static binary
$STRIPCMD "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
echo " Stripped static executable: ${f#$PKGDESTDIR}"
else
make_debug "$f"
$STRIPCMD "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
Expand Down Expand Up @@ -125,8 +123,7 @@ hook() {
chmod +w "$f"
# shared library
make_debug "$f"
$STRIPCMD --strip-unneeded "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD --strip-unneeded "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
Expand All @@ -139,8 +136,7 @@ hook() {
;;
application/x-archive*)
chmod +w "$f"
$STRIPCMD --strip-debug "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD --strip-debug "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
Expand Down
14 changes: 0 additions & 14 deletions srcpkgs/cargo/patches/fix-serde.diff

This file was deleted.

16 changes: 8 additions & 8 deletions srcpkgs/cargo/template
@@ -1,7 +1,7 @@
# Template file for 'cargo'
pkgname=cargo
version=0.49.0
revision=2
version=0.53.0
revision=1
wrksrc="cargo-${version}"
build_helper=rust
hostmakedepends="rust python3 curl cmake pkg-config zlib-devel"
Expand All @@ -12,7 +12,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT, Apache-2.0"
homepage="https://crates.io/"
distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz"
checksum=59ba1ce05becb4a5e0772d334d75f9dce3d5487ca288ac986e786241bb1cbac5
checksum=f8e292b7b1a9e30f0b201a4c0267427a06a8d814083999fb7b183b5c0f168480
replaces="cargo-tree>=0"

build_options="static bindist"
Expand All @@ -21,14 +21,14 @@ desc_option_bindist="Generate a tarball for bootstrap"
# rust upstream no longer ships cargo-versioned tarballs
# need to use the corresponding rust version instead
_bootstrap_url="https://static.rust-lang.org/dist"
_cargo_dist_version="1.48.0"
_cargo_dist_version="1.52.0"

case "$XBPS_MACHINE" in
x86_64*|i686|ppc64le) ;;
ppc*)
# custom bootstrap tarballs still use cargo versioning, so override
_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
_cargo_dist_version="0.49.0"
_cargo_dist_version="0.53.0"
;;
esac

Expand All @@ -45,15 +45,15 @@ distfiles+=" ${_bootstrap_url}/cargo-${_cargo_dist_version}-${RUST_BUILD}.tar.xz
case "$XBPS_MACHINE" in
i686)
checksum+="
1eab76df91e87198632605752d0dd66f3d84b502cbd1f982f6db3d0d8d943cdb"
56e5738e71ebde6af88c6089af99e6785f6b75250781dc64a4ad3639eeb9f0d5"
;;
x86_64)
checksum+="
b11d595581e2580c069b5039214e1031a0e4f87ff6490ac39f92f77857e37055"
d0931a1e728afdfbe3390a2ff3a5256d1668402298a3a6c050ac65ad01c4db2b"
;;
x86_64-musl)
checksum+="
8728cb7515e593f6fcf3c7afba826a92cd227a35b8e936bae892b95482d4fb90"
680dbc224f2a1d9a33a256b15be8d1c58dbdfe88aae3ca9c2b0f805fea568ab3"
;;
ppc64le)
checksum+="
Expand Down
9 changes: 3 additions & 6 deletions srcpkgs/rust-analyzer/template
@@ -1,6 +1,6 @@
# Template file for 'rust-analyzer'
pkgname=rust-analyzer
version=2021.03.08
version=2021.05.24
revision=1
_ver=${version//./-}
wrksrc="${pkgname}-${_ver}"
Expand All @@ -11,14 +11,11 @@ maintainer="Gabriel Sanches <gabriel@gsr.dev>"
license="Apache-2.0, MIT"
homepage="https://rust-analyzer.github.io/"
distfiles="https://github.com/${pkgname}/${pkgname}/archive/${_ver}.tar.gz"
checksum=75d810a4b3fd08d8d0948186f077b754ab9a2a02af3d3c6947e0baa58576e43d
checksum=16890002def8d870710375f5386c494727af0093348bfd7b5571b8227e3de03b
make_check=no # tests require Rust source code

export RUST_ANALYZER_REV=${_ver}

do_check() {
: # tests require Rust source code
}

post_install() {
vlicense LICENSE-APACHE
vlicense LICENSE-MIT
Expand Down
Expand Up @@ -9,19 +9,19 @@ musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index 04345867..8156d5ec 100644
index cba17c8e6..45cbdd81b 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -22,9 +22,6 @@ fn main() {
@@ -20,9 +20,6 @@ fn main() {
Err(_) => 0,
};

- let mut dylib_path = bootstrap::util::dylib_path();
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
-
//FIXME(misdreavus): once stdsimd uses cfg(doc) instead of cfg(dox), remove the `--cfg dox`
//arguments here
let mut cmd = Command::new(rustdoc);
cmd.args(&args)
.arg("--sysroot")
@@ -35,7 +32,7 @@ fn main() {
.arg("dox")
.arg("--sysroot")
Expand Down
Expand Up @@ -15,21 +15,20 @@ Fixes #54243
src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
index 0dd2f029..f22b4277 100644
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 8bc4e6442..52ff7a52e 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -1964,9 +1964,7 @@
@@ -2081,8 +2081,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
}
}

-// Link in all of our upstream crates' native dependencies. Remember that
-// all of these upstream native dependencies are all non-static
-// dependencies. We've got two cases then:
+// Link in all of our upstream crates' native dependencies. We have two cases:
//
// 1. The upstream crate is an rlib. In this case we *must* link in the
// native dependency because the rlib is just an archive.
-/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
-/// native dependencies are all non-static dependencies. We've got two cases then:
+/// Link in all of our upstream crates' native dependencies. We have two cases:
///
/// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
/// the rlib is just an archive.
@@ -2015,7 +2013,19 @@
continue;
}
Expand All @@ -41,7 +40,7 @@ index 0dd2f029..f22b4277 100644
+ // an upstream rlib was originally linked against a native shared library.
+ if crate_type == config::CrateType::Executable
+ && sess.crt_static(Some(crate_type))
+ && !sess.target.target.options.crt_static_allows_dylibs
+ && !sess.target.options.crt_static_allows_dylibs
+ {
+ cmd.link_staticlib(name)
+ } else {
Expand Down