blueloveTH 1 рік тому
батько
коміт
ce8d9600a4
4 змінених файлів з 4 додано та 4 видалено
  1. 1 1
      build.sh
  2. 1 1
      build_g.sh
  3. 1 1
      run_profile.sh
  4. 1 1
      run_tests.sh

+ 1 - 1
build.sh

@@ -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."

+ 1 - 1
build_g.sh

@@ -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"
 

+ 1 - 1
run_profile.sh

@@ -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

+ 1 - 1
run_tests.sh

@@ -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