Compare commits

..
1 Commits
Author SHA1 Message Date
cat c6378d7cc7 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 05:39:38 +09:00
+14 -1
View File
@@ -29,7 +29,6 @@ package mrustc {
writable = true; writable = true;
chmod = true; chmod = true;
minimal = true;
exec = make { exec = make {
inPlace = true; inPlace = true;
skipConfigure = true; skipConfigure = true;
@@ -40,6 +39,8 @@ sed -i 's/\$(shell git symbolic-ref -q --short HEAD || git describe --tags --exa
sed -i 's/\$(shell git diff-index --quiet HEAD; echo $$?)/0/' Makefile sed -i 's/\$(shell git diff-index --quiet HEAD; echo $$?)/0/' Makefile
sed -i 's/\$(shell env LC_TIME=C date -u +"%a, %e %b %Y %T +0000")/Thu, 1 Jan 1970 00:00:00 +0000/' Makefile sed -i 's/\$(shell env LC_TIME=C date -u +"%a, %e %b %Y %T +0000")/Thu, 1 Jan 1970 00:00:00 +0000/' Makefile
export CC=gcc
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")"
export MRUSTC_TARGET_VER="$(cut -d '.' -f 1,2 <<< "$RUSTC_VERSION")" export MRUSTC_TARGET_VER="$(cut -d '.' -f 1,2 <<< "$RUSTC_VERSION")"
@@ -50,15 +51,27 @@ ln -s "$RUSTC_SOURCE" "rustc-$RUSTC_VERSION-src"
`; `;
preCheck = ` preCheck = `
make -f minicargo.mk LIBS make -f minicargo.mk LIBS
make local_tests
`; `;
check = [ "test" ]; check = [ "test" ];
install = `
OUTDIR="output-$RUSTC_VERSION"
make -f minicargo.mk "$OUTDIR/rustc"
make -f minicargo.mk "$OUTDIR/cargo"
make -C run_rustc
`;
}; };
inputs = [ inputs = [
bash, bash,
patch, patch,
cmake,
python,
// mrustc requires buggy gcc behaviour // mrustc requires buggy gcc behaviour
gcc, gcc,
kernel-headers,
]; ];
} }