mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 05:44:17 +08:00
39 lines
1.1 KiB
TOML
39 lines
1.1 KiB
TOML
[source]
|
|
git = "https://gitlab.redox-os.org/redox-os/rust.git"
|
|
branch = "redox-2024-05-11"
|
|
# 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
|
|
shallow_clone = true
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"llvm18",
|
|
"zlib"
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
HOST_STRIP=$STRIP
|
|
# Linker flags for stage2 compiler (host -> target)
|
|
export MAGIC_EXTRA_RUSTFLAGS="${LDFLAGS} -C link-args=-lz"
|
|
# Don't poison the stage1 compiler (host -> host)
|
|
unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF STRIP
|
|
python3 "${COOKBOOK_SOURCE}/x.py" install \
|
|
--config "${COOKBOOK_RECIPE}/config.toml" \
|
|
--jobs $(nproc)
|
|
|
|
rsync -av --delete "${COOKBOOK_BUILD}"/install/* "${COOKBOOK_STAGE}/"
|
|
"${HOST_STRIP}" -v "${COOKBOOK_STAGE}/bin/rustc"
|
|
# TODO: rustdoc
|
|
"""
|
|
|
|
[package]
|
|
dependencies = [
|
|
"gcc13",
|
|
"cargo"
|
|
]
|
|
# TODO: Not implemented
|
|
# version_script = """
|
|
# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
# """
|