diff --git a/mingw-w64-rust/0001-add-missing-libs.patch b/mingw-w64-rust/0001-add-missing-libs.patch index be477fb8b3381..9335646033953 100644 --- a/mingw-w64-rust/0001-add-missing-libs.patch +++ b/mingw-w64-rust/0001-add-missing-libs.patch @@ -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 diff --git a/mingw-w64-rust/PKGBUILD b/mingw-w64-rust/PKGBUILD index ee21c99f84e84..afd7f017a56dd 100644 --- a/mingw-w64-rust/PKGBUILD +++ b/mingw-w64-rust/PKGBUILD @@ -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') @@ -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' @@ -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 @@ -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 + # - 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} \ @@ -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} \ @@ -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