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

rust: Update to 1.58.1 #10555

Merged
merged 3 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions mingw-w64-rust/0001-add-missing-libs.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index caa2740408..52738a47f7 100644
index 943ce589c4f..ea524daa93c 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -300,6 +300,7 @@
@@ -302,6 +302,7 @@ fn main() {
// Libstdc++ depends on pthread which Rust doesn't link on MinGW
// since nothing else requires it.
if target.contains("windows-gnu") {
+ println!("cargo:rustc-link-lib=static-nobundle=ffi");
println!("cargo:rustc-link-lib=static-nobundle=pthread");
+ println!("cargo:rustc-link-lib=static:-bundle=ffi");
println!("cargo:rustc-link-lib=static:-bundle=pthread");
}
}
--
2.12.0
19 changes: 12 additions & 7 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ _bootstrapping=yes
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-rust-docs")
pkgver=1.57.0
pkgrel=3
pkgver=1.58.1
pkgrel=1
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
Expand Down Expand Up @@ -37,9 +37,9 @@ source=("https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz"{,
"0005-win32-config.patch"
"0007-clang-subsystem.patch"
"0008-disable-self-contained.patch")
sha256sums=('3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a'
sha256sums=('a839afdd3625d6f3f3c4c10b79813675d1775c460d14be1feaf33a6c829c07c7'
'SKIP'
'c706841ace2ef76fd1004b9c0486ea9ef7d99073c5ce2884e4c97fa4a7beab25'
'8c9c37f2ff3bee7d9ac520c66d3f37fd7f002012ddca4ddeeab2b009f520e4ce'
'6cc3234644768e24824e455d6304585c717ae25aa53ebf9cf1f1dea87bf869b7'
'c4e5ffeef84296d39c3e3e8f807fc8b33ce786b1e4edb21eef26b053586aca27'
'c79d91a7419e8b0da76295c3d64aa5e984851c7e03b778f6230a660a010c9a66'
Expand Down Expand Up @@ -77,7 +77,7 @@ build() {
export RUSTFLAGS_BOOTSTRAP="-C link-arg=-L$(cygpath -am build/missing-libs-hack)"
fi

#We have to do the following because rust doesn't count x86_64-w64-mingw32 as a target triple
# We have to do the following because rust doesn't count x86_64-w64-mingw32 as a target triple
OSTYPE="$CARCH-pc-windows-gnu"

# Otherwise it uses gcc during bootstrap, even when we build for clang
Expand All @@ -88,6 +88,11 @@ build() {
_rust_conf+=("--local-rust-root=$(cygpath -m ${MINGW_PREFIX})")
fi

# For a faster build:
# - add --disable-docs and --disable-compiler-docs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a simple way to skip package_rust-docs() when docs is disabled ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could remove it from the pkgname array

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could also add a flag in the PKGBUILD to easily disable it (don't add to pkgname, pass the build options)

# - compile only rustc by removing --enable-extended
# - run makepkg-mingw with --nocheck

MSYS2_ARG_CONV_EXCL="--prefix;--sysconfdir;--localstatedir" \
../${_realname}c-${pkgver}-src/configure \
--prefix=${MINGW_PREFIX} \
Expand All @@ -109,7 +114,7 @@ build() {
DEP_Z_ROOT=${MINGW_PREFIX} \
${MINGW_PREFIX}/bin/python ../${_realname}c-${pkgver}-src/x.py build --verbose --stage 2

#create the install at a temporary directory
# create the install at a temporary directory
DEP_NGHTTP_ROOT=${MINGW_PREFIX} \
DEP_OPENSSL_ROOT=${MINGW_PREFIX} \
DEP_Z_ROOT=${MINGW_PREFIX} \
Expand Down Expand Up @@ -145,7 +150,7 @@ package_rust() {
install -Dm644 ${srcdir}/${_realname}c-${pkgver}-src/LICENSE-APACHE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-APACHE"
install -Dm644 ${srcdir}/${_realname}c-${pkgver}-src/LICENSE-MIT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-MIT"

# delete unnecesary files, e.g. components and manifest files only used for the uninstall script
# delete unnecessary files, e.g. components and manifest files only used for the uninstall script
cd "$pkgdir"/${MINGW_PREFIX}/lib/rustlib
rm components install.log manifest-* rust-installer-version uninstall.sh

Expand Down