Compare commits

..
1 Commits
Author SHA1 Message Date
cat cc55369b54 mrustc: init
This contains some extraordinarily ugly hacks for a set of even uglier
Makefiles.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-19 09:04:50 +09:00
+10 -9
View File
@@ -27,7 +27,6 @@ package mrustc {
"0002-Revert-HIR-Typecheck-Optimise-by-doing-multiple-chec.patch",
];
extra = [ rustc-bootstrap-source ];
minimal = true;
enterSource = true;
writable = true;
@@ -37,9 +36,7 @@ package mrustc {
inPlace = true;
skipConfigure = true;
preMake = `
ln -sf gcc /system/bin/cc
ln -sf g++ /system/bin/c++
export CC=gcc CXX=g++
export PARLEVEL=`+jobsE+`
export RUSTC_SOURCE='../extra/rustc-bootstrap-source'
export RUSTC_VERSION="$(cut -d ' ' -f 1 "$RUSTC_SOURCE/version")"
@@ -62,20 +59,24 @@ make local_tests
check = [ "test" ];
install = `
LLVM="$(which llvm-config)"
OUTDIR="output-$RUSTC_VERSION"
make -f minicargo.mk LLVM_CONFIG="$LLVM" "$OUTDIR/rustc"
make -f minicargo.mk LLVM_CONFIG="$LLVM" "$OUTDIR/cargo"
make -C LLVM_CONFIG="$LLVM" run_rustc
make -f minicargo.mk "$OUTDIR/rustc"
make -f minicargo.mk "$OUTDIR/cargo"
make -C run_rustc
`;
};
inputs = [
bash,
patch,
llvm,
cmake,
pkg-config,
perl,
python,
// mrustc requires buggy gcc behaviour
gcc,
kernel-headers,
];
}