Skip to content

Commit

Permalink
Bocfel now has a no-stdio mode, which means we can now successfully b…
Browse files Browse the repository at this point in the history
…uild it! (with a few small RemGlk-rs fixes)
  • Loading branch information
curiousdannii committed Oct 1, 2024
1 parent 801de02 commit fb1b3ae
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- run: ./src/build.sh
- run: ./build.sh
- uses: actions/upload-artifact@v4
with:
name: build
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ target_compile_definitions(glulxe-profiler-core PRIVATE OS_UNIX VM_PROFILING)
target_compile_options(glulxe-profiler-core PRIVATE -Wall -Wmissing-prototypes -Wno-unused)
]]

#[[
add_executable(bocfel)
add_sources(bocfel "garglk/terps/bocfel/"
SRCS blorb.cpp branch.cpp dict.cpp iff.cpp io.cpp mathop.cpp meta.cpp memory.cpp objects.cpp
osdep.cpp patches.cpp process.cpp random.cpp screen.cpp sound.cpp stack.cpp stash.cpp unicode.cpp
util.cpp zoom.cpp zterp.cpp glkstart.cpp)
SRCS blorb.cpp branch.cpp dict.cpp glkstart.cpp iff.cpp io.cpp mathop.cpp
meta.cpp memory.cpp objects.cpp options.cpp osdep.cpp patches.cpp process.cpp
random.cpp screen.cpp sound.cpp stack.cpp stash.cpp unicode.cpp util.cpp
zoom.cpp zterp.cpp)
emglken_vm(bocfel)
set_property(TARGET bocfel PROPERTY CXX_STANDARD 14)
target_compile_definitions(bocfel PRIVATE ZTERP_GLK ZTERP_GLK_BLORB ZTERP_GLK_UNIX)
target_compile_definitions(bocfel PRIVATE ZTERP_GLK ZTERP_GLK_BLORB ZTERP_GLK_UNIX
ZTERP_NO_STDIO "ZTERP_STATIC_PATCH_FILE=\"static-patches.h\"")
target_compile_options(bocfel PRIVATE -Wall)
# Bocfel now uses exceptions, which takes a little bit to set up
target_compile_options(bocfel PRIVATE -fexceptions)
target_link_options(bocfel PRIVATE -sFILESYSTEM=1 -sNO_DISABLE_EXCEPTION_CATCHING)
]]
target_link_options(bocfel PRIVATE -sNO_DISABLE_EXCEPTION_CATCHING)

add_executable(git)
add_sources(git "git/"
Expand Down
2 changes: 1 addition & 1 deletion src/build.sh → build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

cd "$(dirname "$0")/.."
cd "$(dirname "$0")"

mkdir -p build

Expand Down
2 changes: 1 addition & 1 deletion garglk
Submodule garglk updated 276 files
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"eslint": "^8.16.0"
},
"scripts": {
"build": "./src/build.sh",
"build": "./build.sh",
"lint": "eslint bin/ src/",
"test": "./tests/runtests.sh"
},
Expand Down
2 changes: 1 addition & 1 deletion remglk
4 changes: 2 additions & 2 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ENV CARGO_HOME=/.cargo \
PATH="/.cargo/bin:$PATH" \
RUSTUP_HOME=/.rustup

RUN embuilder --lto=thin build libc libc++abi-noexcept libc++-noexcept libcompiler_rt \
libdlmalloc libsockets libstubs zlib
RUN embuilder --lto=thin build libc libc++ libc++abi libc++-noexcept libc++abi-noexcept \
libcompiler_rt libdlmalloc libsockets libstubs zlib

# LLVM version: 17
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.77.0 --target wasm32-unknown-emscripten -y && \
Expand Down
6 changes: 3 additions & 3 deletions tests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ if [ ! -f regtest.py ]; then
wget -q https://github.com/erkyrath/plotex/raw/master/regtest.py
fi

# echo 'Bocfel'
# python regtest.py -i "../bin/emglken.js" praxix.z5.regtest -t 10
# python regtest.py -i "../bin/emglken.js --rem=1" advent.z5.regtest -t 10
echo 'Bocfel'
python regtest.py -i "../bin/emglken.js" praxix.z5.regtest -t 10
python regtest.py -i "../bin/emglken.js --rem=1" advent.z5.regtest -t 10
echo 'Git'
python regtest.py -i "../bin/emglken.js --vm=git" glulxercise.ulx.regtest -t 10
python regtest.py -i "../bin/emglken.js --rem=1 --vm=git" advent.ulx.regtest -t 10
Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"bocfel": "2.1.2",
"bocfel": "2.2.1",
"emglken": "0.6.0",
"git": "1.3.8",
"glulxe": "0.6.1",
Expand Down

0 comments on commit fb1b3ae

Please sign in to comment.