Update and Fix rust linking

This commit is contained in:
Wildan Mubarok 2025-07-25 03:50:05 +00:00
parent 671517b9a4
commit 7b9f586c37
2 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,10 @@
[llvm]
# TODO: LLVM is only compiled for stage1,
# it should be possible to enable this
download-ci-llvm = false
static-libstdcpp = false
targets = "X86"
experimental-targets = ""
# TODO: This currently must need to be set manually.
# If you like to build llvm with sccache, uncomment:
# ccache = "sccache"
@ -19,7 +23,6 @@ sysconfdir = "etc"
[rust]
backtrace = false
rpath = false
codegen-tests = false
[target.x86_64-unknown-redox]
@ -29,4 +32,5 @@ ar = "x86_64-unknown-redox-ar"
linker = "x86_64-unknown-redox-gcc"
# Nasty path, please fix
llvm-config = "../../../../bin/x86_64-unknown-redox-llvm-config"
rpath = false
crt-static = false

View File

@ -1,8 +1,8 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/rust.git"
branch = "redox-2024-05-11"
branch = "redox-2025-01-12"
# due to heavy git operation, this will only clone once and will not refetch
# if you want to refetch or changing the branch, please do ucr.rust
# if you want to refetch or changing the branch, please run `make ucr.rust`
shallow_clone = true
[build]
@ -15,9 +15,9 @@ script = """
DYNAMIC_INIT
HOST_STRIP=$STRIP
# Linker flags for stage2 compiler (host -> target)
export MAGIC_EXTRA_RUSTFLAGS="${LDFLAGS} -C link-args=-lz"
export LDFLAGS_x86_64_unknown_redox="${LDFLAGS}"
# Don't poison the stage1 compiler (host -> host)
unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF STRIP
unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF RUSTFLAGS STRIP
python3 "${COOKBOOK_SOURCE}/x.py" install \
--config "${COOKBOOK_RECIPE}/config.toml" \
--jobs $(nproc)
@ -29,7 +29,6 @@ rsync -av --delete "${COOKBOOK_BUILD}"/install/* "${COOKBOOK_STAGE}/"
[package]
dependencies = [
"gcc13",
"cargo"
]
# TODO: Not implemented