Compare commits

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