Build system mildly overhauled
Juniper Beatitudes [email protected]
Sun, 19 Jul 2026 18:46:41 -0500
4 files changed,
54 insertions(+),
8 deletions(-)
A
crossfiles/x86_64-linux.ini
@@ -0,0 +1,12 @@
+[binaries] +c = 'gcc' +cpp = 'g++' +ar = 'ar' +windres = 'windres' +strip = 'strip' + +[host_machine] +system = 'linux' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little'
M
flake.nix
→
flake.nix
@@ -24,8 +24,8 @@ };
aphrodite_shl = pkgs.mkShell { name = "circe-tooling-env-aphrodite"; packages = with pkgs; [ - muon - samurai + meson + ninja just gcc clang-tools@@ -33,6 +33,8 @@ valgrind
bear tokei ruby + just-lsp + just-formatter ]; NIX_ENFORCE_NO_NATIVE = 0; hardeningDisable = [ "fortify" ];@@ -40,8 +42,8 @@ };
teiresia_shl = pkgs.mkShell { name = "circe-tooling-env-teiresia"; packages = with pkgs; [ - muon - samurai + meson + ninja just pkgsCross.aarch64-multiplatform-musl.gcc clang-tools@@ -53,8 +55,8 @@ };
demeter_shl = pkgs.mkShell { name = "circe-tooling-env-demeter"; packages = with pkgs; [ - muon - samurai + meson + ninja just pkgsCross.mips64el-linux-gnuabin32.gcc clang-tools@@ -66,8 +68,8 @@ };
persephone_shl = pkgs.mkShell { name = "circe-tooling-env-persephone"; packages = with pkgs-persephone; [ - muon - samurai + meson + ninja just esp-idf-xtensa qemu-esp32
A
justfile
@@ -0,0 +1,32 @@
+targets := `find crossfiles -type f | awk -F'[/.]' '{print $2}' | sed -z 's/\n/|/g'` +bash := `which bash` + +list-targets: + @echo `echo '{{ targets }}' | sed 's/|/, /g'` + +[working-directory('.')] +core target: + #!{{ bash }} + set -euo pipefail + + if [[(! "{{ target }}" =~ "^{{ targets }}$") || (-z "{{ target }}")]]; then + echo "Target not supported. Use 'just list-targets' for a list of supported core targets." + exit 1 + fi + + echo 'Building libcirce-core for target {{ target }}' + meson setup --cross-file $(pwd)/crossfiles/{{ target }}.ini build-{{ target }} + ninja -C build-{{ target }} libcirce-core.a + +[working-directory('.')] +cleanall: + #!{{ bash }} + set -euo pipefail + + echo 'Cleaning repo' + for target in `echo '{{ targets }}' | sed 's/|/\n/g'` + do + if [[ -d "build-${target}" ]]; then + ninja -C build-${target} clean + fi + done