Skip to content

Commit 13abfad

Browse files
authored
bump(main/rust): 1.91.0 (#27075)
Sync patches from TUR rustc-nightly
1 parent 4db3a67 commit 13abfad

File tree

4 files changed

+48
-17
lines changed

4 files changed

+48
-17
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
--- a/library/std/src/sys/pal/unix/os.rs
22
+++ b/library/std/src/sys/pal/unix/os.rs
3-
@@ -771,7 +771,7 @@
4-
if #[cfg(all(target_vendor = "apple", not(miri)))] {
5-
darwin_temp_dir()
6-
} else if #[cfg(target_os = "android")] {
7-
- PathBuf::from("/data/local/tmp")
8-
+ PathBuf::from("@TERMUX_PREFIX@/tmp")
9-
} else {
10-
PathBuf::from("/tmp")
11-
}
3+
@@ -601,7 +601,7 @@
4+
crate::env::var_os("TMPDIR").map(PathBuf::from).unwrap_or_else(|| {
5+
cfg_select! {
6+
all(target_vendor = "apple", not(miri)) => darwin_temp_dir(),
7+
- target_os = "android" => PathBuf::from("/data/local/tmp"),
8+
+ target_os = "android" => PathBuf::from("@TERMUX_PREFIX@/tmp"),
9+
_ => PathBuf::from("/tmp"),
10+
}
11+
})
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ErrorIndexGenerator should run on the build machine rather than the target machine.
2+
This seems a bug since https://github.com/rust-lang/rust/pull/145007
3+
4+
--- a/src/bootstrap/src/core/build_steps/tool.rs
5+
+++ b/src/bootstrap/src/core/build_steps/tool.rs
6+
@@ -571,9 +571,9 @@
7+
// for rustc_private and libLLVM.so, and `sysroot_lib` for libstd, etc.
8+
let mut cmd = command(builder.ensure(ErrorIndex { compilers }).tool_path);
9+
10+
- let target_compiler = compilers.target_compiler();
11+
- let mut dylib_paths = builder.rustc_lib_paths(target_compiler);
12+
- dylib_paths.push(builder.sysroot_target_libdir(target_compiler, target_compiler.host));
13+
+ let build_compiler = compilers.build_compiler();
14+
+ let mut dylib_paths = builder.rustc_lib_paths(build_compiler);
15+
+ dylib_paths.push(builder.sysroot_target_libdir(build_compiler, build_compiler.host));
16+
add_dylib_path(dylib_paths, &mut cmd);
17+
cmd
18+
}
19+
@@ -602,9 +602,11 @@
20+
}
21+
22+
fn run(self, builder: &Builder<'_>) -> ToolBuildResult {
23+
+ builder.std(self.compilers.build_compiler, self.compilers.build_compiler.host);
24+
+ builder.ensure(compile::Rustc::new(self.compilers.build_compiler, self.compilers.build_compiler.host));
25+
builder.ensure(ToolBuild {
26+
build_compiler: self.compilers.build_compiler,
27+
- target: self.compilers.target(),
28+
+ target: self.compilers.build_compiler.host,
29+
tool: "error_index_generator",
30+
mode: Mode::ToolRustcPrivate,
31+
path: "src/tools/error_index_generator",

packages/rust/build.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ TERMUX_PKG_HOMEPAGE=https://www.rust-lang.org/
33
TERMUX_PKG_DESCRIPTION="Systems programming language focused on safety, speed and concurrency"
44
TERMUX_PKG_LICENSE="MIT"
55
TERMUX_PKG_MAINTAINER="@termux"
6-
TERMUX_PKG_VERSION="1.90.0+really1.90.0"
7-
TERMUX_PKG_REVISION=1
8-
TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-${TERMUX_PKG_VERSION##*y}-src.tar.xz
9-
TERMUX_PKG_SHA256=6bfeaddd90ffda2f063492b092bfed925c4b8c701579baf4b1316e021470daac
6+
TERMUX_PKG_VERSION="1.91.0"
7+
TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-${TERMUX_PKG_VERSION}-src.tar.xz
8+
TERMUX_PKG_SHA256=9b94161dba3aa32192e0e75f7891912d98095ffb86087b07a05af35a0265a938
109
_LLVM_MAJOR_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo $LLVM_MAJOR_VERSION)
1110
_LLVM_MAJOR_VERSION_NEXT=$((_LLVM_MAJOR_VERSION + 1))
1211
_LZMA_VERSION=$(. $TERMUX_SCRIPTDIR/packages/liblzma/build.sh; echo $TERMUX_PKG_VERSION)
@@ -15,7 +14,7 @@ TERMUX_PKG_BUILD_DEPENDS="wasi-libc"
1514
TERMUX_PKG_SUGGESTS="rust-analyzer"
1615
TERMUX_PKG_NO_REPLACE_GUESS_SCRIPTS=true
1716
TERMUX_PKG_NO_STATICSPLIT=true
18-
TERMUX_PKG_AUTO_UPDATE=false
17+
TERMUX_PKG_AUTO_UPDATE=true
1918
TERMUX_PKG_RM_AFTER_INSTALL="
2019
bin/llc
2120
bin/llvm-*
@@ -117,7 +116,7 @@ termux_step_configure() {
117116
# like 30 to 40 + minutes ... so lets get it right
118117

119118
# upstream tests build using versions N and N-1
120-
local BOOTSTRAP_VERSION=1.89.0
119+
local BOOTSTRAP_VERSION=1.90.0
121120
if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]]; then
122121
if ! rustup install "${BOOTSTRAP_VERSION}"; then
123122
echo "WARN: ${BOOTSTRAP_VERSION} is unavailable, fallback to stable version!"
@@ -187,6 +186,9 @@ termux_step_configure() {
187186
export CARGO_TARGET_${env_host}_RUSTFLAGS+=" -C link-arg=-Wl,-rpath=${TERMUX_PREFIX}/lib -C link-arg=-Wl,--enable-new-dtags"
188187

189188
unset CC CFLAGS CFLAGS_${env_host} CPP CPPFLAGS CXX CXXFLAGS LD LDFLAGS PKG_CONFIG RANLIB
189+
190+
# Needed by wasm32-wasip2
191+
cargo install wasm-component-ld
190192
}
191193

192194
termux_step_make() {
@@ -216,7 +218,6 @@ termux_step_make_install() {
216218

217219
# remove version suffix: beta, nightly
218220
local VERSION=${TERMUX_PKG_VERSION//~*}
219-
VERSION="${VERSION##*y}"
220221

221222
if [[ "${TERMUX_ON_DEVICE_BUILD}" == "true" ]]; then
222223
echo "WARN: Replacing on device rust! Caveat emptor!"

scripts/build/setup/termux_setup_rust.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ termux_setup_rust() {
2929
if [[ "${TERMUX_RUST_VERSION}" == *"~beta"* ]]; then
3030
TERMUX_RUST_VERSION="beta"
3131
fi
32-
TERMUX_RUST_VERSION="${TERMUX_RUST_VERSION##*y}"
3332

3433
curl https://sh.rustup.rs -sSfo "${TERMUX_PKG_TMPDIR}"/rustup.sh
3534
sh "${TERMUX_PKG_TMPDIR}"/rustup.sh -y --default-toolchain "${TERMUX_RUST_VERSION}"

0 commit comments

Comments
 (0)