Vendor tinycc and build the compositor in debug with it (just build/run)
CI / test (push) Successful in 38s
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:
1 parent
49e91b4c01
commit
7a37039673
96 files changed
+83760
-4
No files matched your search
@@ -5,14 +5,33 @@ export PATH := env_var('HOME') + "/.moon/bin:" + env_var('PATH')
|
||||
|
||||
socket := env_var_or_default('XDG_RUNTIME_DIR', '/tmp') + "/wayland-moon-0"
|
||||
theme := "config/themes/moon-night.json"
|
||||
exe := "_build/native/release/build/compositor/bin/bin.exe"
|
||||
debug_exe := "_build/native/debug/build/compositor/bin/bin.exe"
|
||||
exe := "_build/native/debug/build/compositor/bin/bin.exe"
|
||||
release_exe := "_build/native/release/build/compositor/bin/bin.exe"
|
||||
tcc := justfile_directory() + "/scripts/tcc/tcc"
|
||||
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# Build the native compositor (release: the software rasteriser is slow in debug).
|
||||
build:
|
||||
# Build the vendored tinycc (third_party/tinycc) into _build/tcc, once.
|
||||
tcc-build:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
[ -x _build/tcc/bin/tcc ] && exit 0
|
||||
root="$PWD"
|
||||
rm -rf _build/tcc-src
|
||||
mkdir -p _build
|
||||
cp -r third_party/tinycc _build/tcc-src
|
||||
cd _build/tcc-src
|
||||
./configure --prefix="$root/_build/tcc" >/dev/null
|
||||
make -j"$(nproc)" >/dev/null
|
||||
make install >/dev/null
|
||||
|
||||
# Debug build of the native compositor, compiled and linked with the vendored tcc.
|
||||
build: tcc-build
|
||||
MOON_CC={{tcc}} MOON_STUB_CC={{tcc}} moon build --target native --warn-list -a compositor/bin
|
||||
|
||||
# Optimised build with the system C compiler (slower to build, faster to run).
|
||||
build-release:
|
||||
moon build --target native --release --warn-list -a compositor/bin
|
||||
|
||||
# Run the compositor in a window on your current Wayland session (close the window or Ctrl-C to stop). Connect clients via `just client`.
|
||||
|
||||
Reference in new issue
Block a user