rust: build with llvm19

This commit is contained in:
Daniel Martinez 2024-11-21 17:42:12 -05:00 committed by tranzystorekk
parent fc6ec1e833
commit c01f676a42
2 changed files with 6 additions and 18 deletions

View File

@ -1,13 +0,0 @@
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 82b640f54..83fe7660c 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -484,7 +484,7 @@ impl Build {
pub fn require_submodule(&self, submodule: &str, err_hint: Option<&str>) {
// When testing bootstrap itself, it is much faster to ignore
// submodules. Almost all Steps work fine without their submodules.
- if cfg!(test) && !self.config.submodules() {
+ if cfg!(test) || !self.config.submodules() {
return;
}
self.config.update_submodule(submodule);

View File

@ -9,9 +9,10 @@
#
pkgname=rust
version=1.82.0
revision=1
revision=2
_llvmver=19
hostmakedepends="curl pkg-config python3 tar cargo-bootstrap"
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm18-devel"
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm${_llvmver}-devel"
depends="rust-std gcc"
short_desc="Safe, concurrent, practical systems language"
maintainer="Enno Boland <gottox@voidlinux.org>"
@ -23,6 +24,7 @@ lib32disabled=yes
make_check=no # CBA for now
python_version=3 # needed for python files in rust-src
build_helper="qemu"
build_options="bindist"
desc_option_bindist="Generate tarballs for bootstrap"
@ -34,7 +36,7 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
fi
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" rust llvm18-devel"
hostmakedepends+=" rust llvm${_llvmver}-devel"
# These are required for building the buildhost's stage0/1
hostmakedepends+=" libffi-devel libxml2-devel ncurses-devel zlib-devel"
else
@ -49,7 +51,6 @@ _clear_vendor_checksums() {
}
post_patch() {
rm -rf src/llvm-project
if [ "$build_option_bindist" ]; then
for x in ${FILESDIR}/patches/static-llvm/*.patch; do
msg_normal "Applying patch $x\n"
@ -96,7 +97,7 @@ do_configure() {
fi
if [ "$CROSS_BUILD" ]; then
_cross_args="--set=target.${RUST_TARGET}.llvm-config=/usr/bin/llvm-config
_cross_args="--set=target.${RUST_TARGET}.llvm-config=${XBPS_WRAPPERDIR}/llvm-config-qemu
--set=target.${RUST_TARGET}.crt-static=false
--set=target.${RUST_TARGET}.cc=${CC}
--set=target.${RUST_TARGET}.cxx=${CXX}