Update and Fix rust linking
- Update rust to our latest toolchain
- Requires rust!24 (merged)
- Replace
MAGIC_EXTRA_RUSTFLAGSwithLDFLAGS_x86_64_unknown_redoxandCARGO_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_RUSTFLAGSto pass a similar LDFLAGS
- Unset
RUSTFLAGSas it's redundant (equivalent tocrt-static = falsefor stage2) and poisoning the stage1 compiler - Move rust binaries to
/usrto 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.tomlexplanation:- Reduced LLVM targets for faster compilation time
- Move
rpath = falseto 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