From 2268a0d516c4cdc36713966f92e19fe68cefa2e7 Mon Sep 17 00:00:00 2001 From: Kartik Singh Date: Sun, 12 May 2024 13:24:51 -0400 Subject: [PATCH] Statically link SBCL --- .github/workflows/windows.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c73a7df6..2ce096bf 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,9 +34,7 @@ jobs: run: | PATH=$PATH:"/c/Program Files/Steel Bank Common Lisp/1.4.14" export PATH - ./make.sh --xc-host='sbcl --lose-on-corruption --disable-ldb --disable-debugger' - ./make-shared-library.sh - mv src/runtime/libsbcl.so src/runtime/libsbcl.dll + ./make.sh --xc-host='sbcl --lose-on-corruption --disable-ldb --disable-debugger' --with-sb-linkable-runtime - name: install quicklisp working-directory: ../sbcl run: | @@ -53,6 +51,6 @@ jobs: pwd $SBCL_SRC/run-sbcl.sh --script script.lisp echo $LIBRARY_PATH - gcc -Wall -fPIC -shared -o libcalc.dll libcalc.c -lsbcl - gcc -Wall -o example example.c -lsbcl -lcalc - echo "(+ 1 2)" | ./example \ No newline at end of file + gcc -Wall -fPIC -shared -o libcalc.dll libcalc.c -Wl,--whole-archive -lsbcl -Wl,--no-whole-archive -ladvapi32 -lsynchronization -lws2_32 -lzstd + gcc -Wall -o example example.c -lcalc + echo "(+ 1 2)" | ./example.exe \ No newline at end of file