Skip to content

Commit 8a81668

Browse files
committed
[TEST] rust 1.93.0.beta1
1 parent badc77e commit 8a81668

File tree

4 files changed

+35
-32
lines changed

4 files changed

+35
-32
lines changed

mingw-w64-rust/0008-disable-self-contained-for-gnu-targets.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
crate_type: CrateType,
55
linker: &Path,
66
) -> LinkSelfContainedComponents {
7-
+ if sess.target.options.os == "windows" && sess.target.options.env == "gnu" {
7+
+ if sess.target.options.os == Os::Windows && sess.target.options.env == Env::Gnu {
88
+ return LinkSelfContainedComponents::empty();
99
+ }
1010
// Turn the backwards compatible bool values for `self_contained` into fully inferred
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
--- a/src/bootstrap/src/core/build_steps/llvm.rs
22
+++ b/src/bootstrap/src/core/build_steps/llvm.rs
3-
@@ -294,7 +294,7 @@
3+
@@ -284,7 +284,7 @@
44
LlvmBuildStatus::ShouldBuild(m) => m,
55
};
66

7-
- if builder.llvm_link_shared() && target.is_windows() && !target.ends_with("windows-gnullvm")
8-
+ if builder.llvm_link_shared() && target.is_msvc()
9-
{
7+
- if builder.llvm_link_shared() && target.is_windows() && !target.is_windows_gnullvm() {
8+
+ if builder.llvm_link_shared() && target.is_msvc() {
109
panic!("shared linking to LLVM is not currently supported on {}", target.triple);
1110
}
11+

mingw-w64-rust/PKGBUILD

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [[ ${CARCH} != i686 && ${MSYSTEM} != MINGW64 ]]; then
1313
fi
1414

1515
#rust_dist_server=https://static.rust-lang.org/dist
16-
rust_dist_server=https://dev-static.rust-lang.org/dist/2025-12-08
16+
rust_dist_server=https://static.rust-lang.org/dist/2025-12-09
1717

1818
_realname=rust
1919
pkgbase=mingw-w64-${_realname}
@@ -22,7 +22,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
2222
$((( _wasm )) && echo \
2323
"${MINGW_PACKAGE_PREFIX}-rust-wasm" \
2424
"${MINGW_PACKAGE_PREFIX}-rust-emscripten"))
25-
pkgver=1.92.0
25+
pkgver=1.93.0.beta1
2626
pkgrel=1
2727
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
2828
arch=('any')
@@ -60,26 +60,24 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
6060
$((( _pgo )) && echo \
6161
"${MINGW_PACKAGE_PREFIX}-compiler-rt" \
6262
"${MINGW_PACKAGE_PREFIX}-lld"))
63-
source=("${rust_dist_server}/${_realname}c-${pkgver}-src.tar.xz"{,.asc}
63+
source=("${rust_dist_server}/${_realname}c-beta-src.tar.xz"{,.asc}
6464
"bootstrap.toml"
6565
"bootstrap-wasm.toml"
6666
"0001-rustc-llvm-fix-libs.patch"
6767
"0004-compiler-Use-wasm-ld-for-wasm-targets.patch"
6868
"0008-disable-self-contained-for-gnu-targets.patch"
6969
"0016-allow-shared-llvm-for-all.patch"
70-
# patches in case of doing PGO for LLVM with opt-dist
71-
#"0015-lesser-llvm-build.patch"
72-
#"https://patch-diff.githubusercontent.com/raw/rust-lang/rust/pull/143898.patch"
73-
)
74-
noextract=(${_realname}c-${pkgver}-src.tar.xz)
75-
sha256sums=('ebee170bfe4c4dfc59521a101de651e5534f4dae889756a5c97ca9ea40d0c307'
70+
"0015-lesser-llvm-build.patch")
71+
noextract=(${_realname}c-beta-src.tar.xz)
72+
sha256sums=('af3e7fe0843ecfff1168dba08615b7e500a8f9aa82926c422d01754156ca38f6'
7673
'SKIP'
77-
'893352a1bbd21297b7f3e2b389a4e5f6f7b182a14178a66891bd3d0e1a6cb0c8'
74+
'6b73885347fbdc4f2e5ce5ba50a4fb37faf77cc8377e64b9f91896556c651122'
7875
'd693577fabe39a3046cd44fd002adf9557de6883eaea9007eae7f8372295ea0e'
7976
'7cb1773c288ffb1c1e751edc49b1890c84bf9c362742bc5225d19d474edb73a0'
8077
'56882f1a0f1404c10c7726d6cc37444f2b343e72b969badfcb43760f80db0f32'
81-
'87b68c2dfbe996d3ef439278e1ac90997fc4ea192f449e8f00262360a551386a'
82-
'f891ce9c3b040a17c8764d8dcbd78d39be089bffbfb884050f2a612a923536c6')
78+
'767db21e86364eb6777404ba6eee94133b5878ad42fa34afa9aea641ab533759'
79+
'eb74e880cbbd469f231b0806875a4f91ff97bba7ae197e04bd0281dd60f63b19'
80+
'271d38fe98015a23dfd5bd084e0e259799258448133ba7b5ef418e844b474f01')
8381
validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
8482
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
8583
'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
@@ -99,10 +97,10 @@ apply_patch_with_msg() {
9997
COMPRESSZST+=(--long)
10098

10199
prepare() {
102-
plain "Extracting ${_realname}c-${pkgver}-src.tar.xz"
103-
tar -xJf ${_realname}c-${pkgver}-src.tar.xz || true
100+
plain "Extracting ${_realname}c-beta-src.tar.xz"
101+
tar -xJf ${_realname}c-beta-src.tar.xz || true
104102

105-
cd ${_realname}c-${pkgver}-src
103+
cd ${_realname}c-beta-src
106104
if [[ ${CARCH} == i686 ]]; then
107105
apply_patch_with_msg \
108106
0001-rustc-llvm-fix-libs.patch
@@ -112,11 +110,12 @@ prepare() {
112110
apply_patch_with_msg \
113111
0008-disable-self-contained-for-gnu-targets.patch \
114112
0004-compiler-Use-wasm-ld-for-wasm-targets.patch \
115-
0016-allow-shared-llvm-for-all.patch
113+
0016-allow-shared-llvm-for-all.patch \
114+
0015-lesser-llvm-build.patch
116115
}
117116

118117
build() {
119-
cd "${_realname}c-${pkgver}-src"
118+
cd "${_realname}c-beta-src"
120119

121120
# We have to do the following because rust doesn't count x86_64-w64-mingw32 as a target triple
122121
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
@@ -146,6 +145,9 @@ build() {
146145
export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
147146
export LIBSSH2_SYS_USE_PKG_CONFIG=1
148147

148+
# they're managed by config
149+
unset RUSTFLAGS
150+
149151
# substitute the values in bootstrap.toml
150152
export MSYS2_ENV_CONV_EXCL='INSTALL_PREFIX'
151153
export INSTALL_PREFIX="${MINGW_PREFIX}"
@@ -169,13 +171,15 @@ build() {
169171
fi
170172

171173
if (( _pgo )); then
172-
sed -i -e 's/#bootstrap-override-lld/bootstrap-override-lld/' bootstrap.toml
174+
sed -i -e 's/#bootstrap-override-lld/bootstrap-override-lld/' \
175+
-e 's/#download-ci-llvm/download-ci-llvm/' \
176+
-e 's/llvm-config/#llvm-config/' bootstrap.toml
173177
# build opt-dist tool which manages PGO build
174178
python x.py build opt-dist --target="$OSTYPE"
175179
local _pgo_opts=(--target-triple="$OSTYPE"
176180
--checkout-dir="$PWD"
177181
--llvm-dir="${MINGW_PREFIX}"
178-
--build-llvm=false
182+
--llvm-shared=false
179183
--python="${MINGW_PREFIX}/bin/python.exe"
180184
--artifact-dir=opt-artifacts-${MSYSTEM}
181185
--build-dir=build-${MSYSTEM})
@@ -185,12 +189,10 @@ build() {
185189
# run opt-dist to get rustc optimized with PGO. add linker flag for InitSecurityInterfaceA symbol
186190
CXXFLAGS="$CXXFLAGS -fuse-ld=lld" \
187191
DESTDIR="$PWD/build-$MSYSTEM/dest-rust" \
188-
RUSTFLAGS="${RUSTFLAGS/+crt-static/-crt-static} -C link-arg=-lsecur32" \
189192
build-${MSYSTEM}/${OSTYPE}/stage1-tools-bin/opt-dist local ${_pgo_opts[@]} -- \
190193
python x.py install
191194
else
192195
DESTDIR="$PWD/build-$MSYSTEM/dest-rust" \
193-
RUSTFLAGS="${RUSTFLAGS/+crt-static/-crt-static} -C link-arg=-lsecur32" \
194196
python x.py install --stage 2
195197
fi
196198

@@ -219,7 +221,7 @@ build() {
219221
}
220222

221223
check() {
222-
cd "${_realname}c-${pkgver}-src"
224+
cd "${_realname}c-beta-src"
223225
python x.py test --stage 2 --exclude src/test/debuginfo
224226
}
225227

@@ -243,7 +245,7 @@ package_rust() {
243245
conflicts=("${MINGW_PACKAGE_PREFIX}-rust-docs")
244246
replaces=("${MINGW_PACKAGE_PREFIX}-rust-docs")
245247

246-
cd "${_realname}c-${pkgver}-src/build-${MSYSTEM}"
248+
cd "${_realname}c-beta-src/build-${MSYSTEM}"
247249

248250
cp -a dest-rust/* "${pkgdir}"
249251

@@ -269,7 +271,7 @@ package_rust-wasm() {
269271
# strip wasm object files manually due to binutils' lack of support
270272
options=('!strip')
271273

272-
cd "${_realname}c-${pkgver}-src/build-${MSYSTEM}"
274+
cd "${_realname}c-beta-src/build-${MSYSTEM}"
273275

274276
cp -a dest-wasm/* "${pkgdir}"
275277

@@ -293,7 +295,7 @@ package_rust-emscripten() {
293295
"${MINGW_PACKAGE_PREFIX}-zstd")
294296
options=('!strip')
295297

296-
cd "${_realname}c-${pkgver}-src/build-${MSYSTEM}"
298+
cd "${_realname}c-beta-src/build-${MSYSTEM}"
297299

298300
cp -a dest-emscripten/* "${pkgdir}"
299301

@@ -313,7 +315,7 @@ package_rust-src() {
313315
pkgdesc='Source code for the Rust standard library (mingw-w64)'
314316
depends=("${MINGW_PACKAGE_PREFIX}-rust")
315317

316-
cd "${_realname}c-${pkgver}-src/build-${MSYSTEM}"
318+
cd "${_realname}c-beta-src/build-${MSYSTEM}"
317319

318320
cp -a dest-src/* "${pkgdir}"
319321
install -Dm644 ../LICENSE-{APACHE,MIT} -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-src"

mingw-w64-rust/bootstrap.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ profile = "dist"
55
change-id = 146435
66

77
[llvm]
8-
#link-shared = true
8+
#download-ci-llvm = true
99

1010
[build]
1111
#cargo = "$MINGW_PREFIX/bin/cargo.exe"
@@ -69,6 +69,7 @@ ar = "$MINGW_PREFIX/bin/llvm-ar.exe"
6969
ranlib = "$MINGW_PREFIX/bin/llvm-ranlib.exe"
7070
linker = "$MINGW_PREFIX/bin/clang.exe"
7171
llvm-config = "$MINGW_PREFIX/bin/llvm-config.exe"
72+
rustflags = ["-Ctarget-feature=-crt-static", "-Clink-arg=-lsecur32"]
7273

7374
[target.wasm32-unknown-unknown]
7475
cc = "$MINGW_PREFIX/bin/clang.exe"

0 commit comments

Comments
 (0)