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 test #20651

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 3 additions & 1 deletion .ci/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ for package in "${packages[@]}"; do
execute 'Fetch keys' "$DIR/fetch-validpgpkeys.sh"
cp -r ${package} B && cd B
message 'Building binary'
makepkg-mingw --noconfirm --noprogressbar --nocheck --syncdeps --rmdeps --cleanbuild || failure "${status} failed"
declare -a makepkg_args=()
grep -qFx "${package}" "$DIR/ci-check-list.txt" || makepkg_args+=("--nocheck")
makepkg-mingw --noconfirm --noprogressbar --syncdeps --rmdeps --cleanbuild "${makepkg_args[@]}" || failure "${status} failed"
cd - > /dev/null
repo-add $PWD/artifacts/ci.db.tar.gz $PWD/B/*.pkg.tar.*
pacman -Sy
Expand Down
1 change: 1 addition & 0 deletions .ci/ci-check-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mingw-w64-rust
7 changes: 0 additions & 7 deletions mingw-w64-rust/0013-backport-compiler-builtins.patch

This file was deleted.

66 changes: 41 additions & 25 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
fi

rust_dist_server=https://static.rust-lang.org/dist
#rust_dist_server=https://dev-static.rust-lang.org/dist/2024-03-17
#rust_dist_server=https://dev-static.rust-lang.org/dist/2024-06-10

embed_manifest_version=1.3.1
embed_manifest_url=https://gitlab.com/careyevans/embed-manifest/-/archive/v${embed_manifest_version}/embed-manifest-v${embed_manifest_version}.tar.gz
Expand All @@ -19,8 +19,8 @@ pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
$([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-rust-docs")
"${MINGW_PACKAGE_PREFIX}-rust-src")
pkgver=1.78.0
pkgrel=2
pkgver=1.79.0
pkgrel=1
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
Expand All @@ -44,30 +44,27 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
$([[ "$_bootstrapping" == "no" ]] && echo "${MINGW_PACKAGE_PREFIX}-rust")
"${MINGW_PACKAGE_PREFIX}-zlib")
checkdepends=($([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-gcc-compat"))
source=("${rust_dist_server}/${_realname}c-${pkgver}-src.tar.gz"{,.asc}
"${embed_manifest_url}"
"https://github.com/rust-lang/compiler-builtins/commit/d8ab794ed61e2c7c0750f57332a680d5aa8db48c.patch"
"https://github.com/rust-lang/compiler-builtins/commit/3f47913bc6414bab4254d49f9f6e7238fecace69.patch"
"https://github.com/rust-lang/rust/commit/eac0b3a1d1b8d1db8fa95c50e118de5b9471e5af.patch"
"0001-rustc-llvm-fix-libs.patch"
"0005-win32-config.patch"
"0007-clang-subsystem.patch"
"0008-disable-self-contained.patch"
"0011-disable-uac-for-installer.patch"
"0012-vendor-embed-manifest.patch"
"0013-backport-compiler-builtins.patch")
"0012-vendor-embed-manifest.patch")
noextract=(${_realname}c-${pkgver}-src.tar.gz)
sha256sums=('ff544823a5cb27f2738128577f1e7e00ee8f4c83f2a348781ae4fc355e91d5a9'
sha256sums=('172ecf3c7d1f9d9fb16cd2a628869782670416ded0129e524a86751f961448c0'
'SKIP'
'24ef6d949c0b5b1940c1d6a7aad78d86012152fb8845a1644bc939350d7b75e2'
'0426bc2a82f56ddabc0646100891bc61b9a57f4b7aec9f45aff40d7ba081db4f'
'b888615732b1c9b0d4e8459cc9bd7ffb8afbf13bab840c2d345dc1492a63c9c3'
'd9a1ac6343c3d5428691701aba2489858cca069510da319ceca9c7bf7ed0ca0d'
'7cb1773c288ffb1c1e751edc49b1890c84bf9c362742bc5225d19d474edb73a0'
'7d1c4e49524b835a8eadc961b39f5594b12a522a1e24368999be2c7e85399e4e'
'46b63be79e4f2d5da2b183ed963429bce22966227bf24a73b158d23875841b11'
'7a3b5722ff576b0661f36796f088dee4ce318b5dbc3fdcd65b48972de68a0edf'
'761d73328d9695a7a2bd2a10be8225f4a56801fee54cbb51c0841b7f16e2bde6'
'23fc45f4e718770375be1c5196f035075de16d25e8f895100a3d1d2492995f86'
'465cb553e9dbaf176ad7b2e9bf7ebd8e481551cf2e8bbb8ba41c80acb28b3ed1')
'23fc45f4e718770375be1c5196f035075de16d25e8f895100a3d1d2492995f86')
validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) <[email protected]>
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <[email protected]>
'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <[email protected]>
Expand Down Expand Up @@ -120,14 +117,10 @@ prepare() {
apply_patch_with_msg \
0012-vendor-embed-manifest.patch

# backport required for CLANG32 to build with compiler-rt 18.1.0
(cd vendor/compiler_builtins && \
apply_patch_with_msg \
d8ab794ed61e2c7c0750f57332a680d5aa8db48c.patch \
3f47913bc6414bab4254d49f9f6e7238fecace69.patch)
# still needs to patch .cargo-checksums.json
apply_patch_with_msg \
0013-backport-compiler-builtins.patch
if [[ $MSYSTEM == MINGW* ]]; then
apply_patch_with_msg \
eac0b3a1d1b8d1db8fa95c50e118de5b9471e5af.patch
fi
}

build() {
Expand Down Expand Up @@ -226,15 +219,37 @@ build() {
mv dest-rust/${MINGW_PREFIX}/share/doc dest-doc
fi

# move src out of the way for splitting
mv dest-rust/${MINGW_PREFIX}/lib/rustlib/src dest-src

rm -f dest-rust/${MINGW_PREFIX}/lib/rustlib/$OSTYPE/lib/self-contained/*
}

check() {
cd "${srcdir}/${MSYSTEM}"
local -a _extra_test_args=()
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
# these fail for gnullvm because dlltool is not used there
_extra_test_args+=(
"--skip" "tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs"
"--skip" "tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs"
"--skip" "tests/run-make/raw-dylib-custom-dlltool")
if [[ $MINGW_PACKAGE_PREFIX == *-i686 || $MINGW_PACKAGE_PREFIX == *-x86_64 ]]; then
# these fail because we modified the *-windows-gnu specs
_extra_test_args+=(
"--skip" "spec::tests::i686_pc_windows_gnu"
"--skip" "spec::tests::x86_64_pc_windows_gnu")
fi
fi
# non-unicode-in-incremental-dir test creates a directory that MSYS2 fails to delete during cleanup
# see https://cygwin.com/pipermail/cygwin/2024-June/256111.html
_extra_test_args+=(
"--skip" "tests/run-make/non-unicode-in-incremental-dir")

DEP_NGHTTP_ROOT=${MINGW_PREFIX} \
DEP_OPENSSL_ROOT=${MINGW_PREFIX} \
DEP_Z_ROOT=${MINGW_PREFIX} \
${MINGW_PREFIX}/bin/python ../${_realname}c-${pkgver}-src/x.py test --stage 2 --exclude src/test/debuginfo
${MINGW_PREFIX}/bin/python ../${_realname}c-${pkgver}-src/x.py test --no-fail-fast --stage 2 -- --skip tests/debuginfo "${_extra_test_args[@]}"
}

package_rust() {
Expand All @@ -257,9 +272,6 @@ package_rust() {
install -d "$pkgdir/${MINGW_PREFIX}/share/bash-completion/completions"
mv "${pkgdir}${MINGW_PREFIX}/etc/bash_completion.d/cargo" \
"${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/cargo"

install -d "${srcdir}/${MSYSTEM}/dest-src${MINGW_PREFIX}/lib/rustlib/src"
mv src/* "${srcdir}/${MSYSTEM}/dest-src${MINGW_PREFIX}/lib/rustlib/src"
}

package_rust-docs() {
Expand All @@ -278,7 +290,11 @@ package_rust-src() {
pkgdesc='Source code for the Rust standard library (mingw-w64)'

cd "${srcdir}/${MSYSTEM}"
cp -a dest-src/* ${pkgdir}
install -Dm644 "${srcdir}"/${_realname}c-${pkgver}-src/LICENSE-APACHE "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE-APACHE"
install -Dm644 "${srcdir}"/${_realname}c-${pkgver}-src/LICENSE-MIT "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE-MIT"

install -d "${pkgdir}/${MINGW_PREFIX}/lib/rustlib/"
cp -a dest-src "${pkgdir}/${MINGW_PREFIX}/lib/rustlib/src"
}

# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
Expand Down
Loading