This commit is contained in:
blueloveTH 2024-09-09 13:49:39 +08:00
parent 34cc526104
commit ce8d9600a4
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ SRC=$(find src/ -name "*.c")
echo "> Compiling and linking source files... "
clang -std=c11 -O2 -Wfatal-errors -Iinclude -DNDEBUG -o main src2/main.c $SRC -lm
clang -std=c11 -O2 -Wfatal-errors -Iinclude -DNDEBUG -o main src2/main.c $SRC -lm -ldl
if [ $? -eq 0 ]; then
echo "Build completed. Type \"./main\" to enter REPL."

View File

@ -4,7 +4,7 @@ python prebuild.py
SRC=$(find src/ -name "*.c")
FLAGS="-std=c11 -lm -Iinclude -O0 -Wfatal-errors -g -DDEBUG -DPK_ENABLE_OS=1"
FLAGS="-std=c11 -lm -ldl -Iinclude -O0 -Wfatal-errors -g -DDEBUG -DPK_ENABLE_OS=1"
SANITIZE_FLAGS="-fsanitize=address,leak,undefined"

View File

@ -4,7 +4,7 @@ python prebuild.py
SRC=$(find src/ -name "*.c")
gcc -pg -Og -std=c11 -Wfatal-errors -o main $SRC src2/main.c -Iinclude -lm -DNDEBUG -flto
gcc -pg -Og -std=c11 -Wfatal-errors -o main $SRC src2/main.c -Iinclude -lm -ldl -DNDEBUG -flto
./main benchmarks/fib.py
gprof main gmon.out > gprof.txt
rm gmon.out

View File

@ -4,7 +4,7 @@ python prebuild.py
SRC=$(find src/ -name "*.c")
clang -std=c11 --coverage -O1 -Wfatal-errors -o main src2/main.c $SRC -Iinclude -DPK_ENABLE_OS=1 -DPK_ENABLE_PROFILER=1 -lm -DNDEBUG
clang -std=c11 --coverage -O1 -Wfatal-errors -o main src2/main.c $SRC -Iinclude -DPK_ENABLE_OS=1 -DPK_ENABLE_PROFILER=1 -lm -ldl -DNDEBUG
python scripts/run_tests.py