...
This commit is contained in:
12
build.sh
12
build.sh
@@ -1,27 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
mkdir -p out
|
mkdir -p out
|
||||||
|
|
||||||
echo "setup..."
|
echo "setup..."
|
||||||
|
|
||||||
dotnet publish -c Release src/compiler/Nub.Lang > /dev/null
|
dotnet publish -c Release src/compiler/Nub.Lang > /dev/null
|
||||||
|
|
||||||
if [[ $? -ne 0 ]] ; then
|
|
||||||
printf "\x1b[31mYour compiler is not compiling!\x1b[0m\n"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "compiling..."
|
echo "compiling..."
|
||||||
|
|
||||||
nub example out/out.qbe
|
nub example out/out.qbe
|
||||||
|
|
||||||
gcc -c -g -fno-stack-protector -fno-builtin src/runtime/gc.c -o out/gc.o
|
|
||||||
nasm -g -felf64 src/runtime/runtime.asm -o out/runtime.o
|
nasm -g -felf64 src/runtime/runtime.asm -o out/runtime.o
|
||||||
|
|
||||||
qbe out/out.qbe > out/out.s
|
qbe out/out.qbe > out/out.s
|
||||||
gcc -c -g out/out.s -o out/out.o
|
gcc -c -g out/out.s -o out/out.o
|
||||||
|
|
||||||
gcc -nostartfiles -o out/program out/gc.o out/runtime.o out/out.o
|
gcc -nostartfiles -o out/program out/runtime.o out/out.o
|
||||||
|
|
||||||
echo "done..."
|
echo "done..."
|
||||||
|
|||||||
Reference in New Issue
Block a user