Update and Fix rust linking
- Update rust to our latest toolchain
- Requires rust!24 (merged)
- Replace
MAGIC_EXTRA_RUSTFLAGS
withLDFLAGS_x86_64_unknown_redox
andCARGO_TARGET_X86_64_UNKNOWN_REDOX_RUSTFLAGS
- This is a clearer (but undocumented?) way to set LDFLAGS specifically for stage2 compiler
- Adapt
CARGO_TARGET_X86_64_UNKNOWN_REDOX_RUSTFLAGS
to pass a similar LDFLAGS
- Unset
RUSTFLAGS
as it's redundant (equivalent tocrt-static = false
for stage2) and poisoning the stage1 compiler - Move rust binaries to
/usr
to fix issues with auto deps - Remove gcc13 dependency. GCC is only used in Rust as a backend alternative of LLVM and only works for Linux x64
- Remove strip process. It's already handled automatically by cookbook.
- Adapt
config.toml
explanation:- Reduced LLVM targets for faster compilation time
- Move
rpath = false
to specifically only use it for stage2 compiler- This is because it's poisoning the stage1 compiler, it can't find the necessary shared lib when it running.
Edited by Wildan Mubarok