Vendor tinycc and build the compositor in debug with it (just build/run)
CI / test (push) Successful in 38s

moon adds -DMOONBIT_NATIVE_NO_SYS_HEADER whenever the C compiler is tcc, which
compiles the system runtime out and breaks linking a standalone exe; the
scripts/tcc/tcc wrapper drops that flag. just tcc-build builds third_party/tinycc
into _build/tcc; build-release keeps the optimised system-cc build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-24 20:53:51 -08:00
1 parent 49e91b4c01
commit 7a37039673
96 files changed
+83760 -4

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# moon's C compiler/linker driver for debug builds: the vendored tinycc
# (third_party/tinycc, built by `just tcc` into _build/tcc).
# moon adds -DMOONBIT_NATIVE_NO_SYS_HEADER whenever the compiler is tcc; that
# mode compiles the system parts of the runtime out (it expects to be JIT-ed
# inside moon), so a standalone executable would not link. Drop it.
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
tcc="$root/_build/tcc/bin/tcc"
args=()
for a in "$@"; do
[ "$a" = "-DMOONBIT_NATIVE_NO_SYS_HEADER" ] || args+=("$a")
done
exec "$tcc" "${args[@]}"