Skip to content

Commit

Permalink
added build script
Browse files Browse the repository at this point in the history
  • Loading branch information
nic-gaffney committed Jun 26, 2023
1 parent ad224b0 commit e9ad9c9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# Build Sloth
cargo build --features=llvm-sys/prefer-dynamic

# Compile standard library
./target/debug/sloth std/stdio.sloth
mv output.o stdio.o
./target/debug/sloth std/stdlib.sloth
mv output.o stdlib.io
./target/debug/sloth std/stdmath.sloth
mv output.o stdmath.o

# Compile user program
./target/debug/sloth "$1"
mv output.o main.o

# Generate binary
gcc stdio.o std/stdio.c stdlib.o std/stdlib.c stdmath.o std/stdmath.c main.o -o program

0 comments on commit e9ad9c9

Please sign in to comment.