Skip to content

Commit c1b3e04

Browse files
committed
rust: Update to 1.78.0
- Switch back to .gz tarball - Replace local bootstrap cache hack with upstreamed option Signed-off-by: Tianling Shen <[email protected]>
1 parent 3cac19e commit c1b3e04

File tree

3 files changed

+51
-59
lines changed

3 files changed

+51
-59
lines changed

lang/rust/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
include $(TOPDIR)/rules.mk
66

77
PKG_NAME:=rust
8-
PKG_VERSION:=1.77.0
8+
PKG_VERSION:=1.78.0
99
PKG_RELEASE:=1
1010

11-
PKG_SOURCE:=rustc-$(PKG_VERSION)-src.tar.xz
11+
PKG_SOURCE:=rustc-$(PKG_VERSION)-src.tar.gz
1212
PKG_SOURCE_URL:=https://static.rust-lang.org/dist/
13-
PKG_HASH:=66126989782cbf77fa3aff121bbb108429f2d46fe19328c3de231553de711b90
13+
PKG_HASH:=ff544823a5cb27f2738128577f1e7e00ee8f4c83f2a348781ae4fc355e91d5a9
1414
HOST_BUILD_DIR:=$(BUILD_DIR)/host/rustc-$(PKG_VERSION)-src
1515

1616
PKG_MAINTAINER:=Luca Barbato <[email protected]>
@@ -74,6 +74,7 @@ HOST_CONFIGURE_ARGS = \
7474
--disable-sanitizers \
7575
--release-channel=stable \
7676
--enable-cargo-native-static \
77+
--bootstrap-cache-path=$(DL_DIR)/rustc \
7778
--set=llvm.download-ci-llvm=true \
7879
$(TARGET_CONFIGURE_ARGS)
7980

@@ -87,7 +88,6 @@ define Host/Compile
8788
$(RUST_SCCACHE_VARS) \
8889
CARGO_HOME=$(CARGO_HOME) \
8990
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
90-
OPENWRT_RUSTC_BOOTSTRAP_CACHE=$(DL_DIR)/rustc \
9191
$(PYTHON) $(HOST_BUILD_DIR)/x.py \
9292
--build-dir $(HOST_BUILD_DIR)/build \
9393
--config $(HOST_BUILD_DIR)/config.toml \
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From bd479113d38aa453cbad9d9f5ca9c5fc8903b0cf Mon Sep 17 00:00:00 2001
2+
From: onur-ozkan <[email protected]>
3+
Date: Thu, 11 Apr 2024 14:57:10 +0300
4+
Subject: [PATCH] correct the handling of `bootstrap-cache-path` option
5+
6+
This change makes `build.bootstrap-cache-path` option to be configurable with
7+
`./configure` script, so it can be used like `./configure --bootstrap-cache-path=demo`.
8+
9+
Signed-off-by: onur-ozkan <[email protected]>
10+
---
11+
config.example.toml | 2 +-
12+
src/bootstrap/configure.py | 4 +++-
13+
2 files changed, 4 insertions(+), 2 deletions(-)
14+
15+
--- a/config.example.toml
16+
+++ b/config.example.toml
17+
@@ -302,7 +302,7 @@
18+
19+
# Set the bootstrap/download cache path. It is useful when building rust
20+
# repeatedly in a CI invironment.
21+
-# bootstrap-cache-path = /shared/cache
22+
+#bootstrap-cache-path = /path/to/shared/cache
23+
24+
# Enable a build of the extended Rust tool set which is not only the compiler
25+
# but also tools such as Cargo. This will also produce "combined installers"
26+
--- a/src/bootstrap/configure.py
27+
+++ b/src/bootstrap/configure.py
28+
@@ -152,9 +152,9 @@ v("default-linker", "rust.default-linker
29+
# (others are conditionally saved).
30+
o("manage-submodules", "build.submodules", "let the build manage the git submodules")
31+
o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two (not recommended except for testing reproducible builds)")
32+
-o("bootstrap-cache-path", "build.bootstrap-cache-path", "use provided path for the bootstrap cache")
33+
o("extended", "build.extended", "build an extended rust tool set")
34+
35+
+v("bootstrap-cache-path", None, "use provided path for the bootstrap cache")
36+
v("tools", None, "List of extended tools will be installed")
37+
v("codegen-backends", None, "List of codegen backends to build")
38+
v("build", "build.build", "GNUs ./configure syntax LLVM build triple")
39+
@@ -359,6 +359,8 @@ def apply_args(known_args, option_checki
40+
set('target.{}.llvm-filecheck'.format(build_triple), value, config)
41+
elif option.name == 'tools':
42+
set('build.tools', value.split(','), config)
43+
+ elif option.name == 'bootstrap-cache-path':
44+
+ set('build.bootstrap-cache-path', value, config)
45+
elif option.name == 'codegen-backends':
46+
set('rust.codegen-backends', value.split(','), config)
47+
elif option.name == 'host':

lang/rust/patches/0002-rustc-bootstrap-cache.patch

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)