ludic/tools/ludic-cli
Orkuncakilkaya 9cc3f24c56 ludic build on every core: the IR split with llvm-split and compiled by a clang per part at once
Most of a build was one clang -O2 on one .ll (the game: 32 s of a 41 s headless build, one core).
Both paths that assemble - the CLI's (build.ludic: ludicc --emit-llvm, then clang) and ludicc's own
(-o, which ludic bundle and the examples use) - now cut the program's IR into N parts with llvm-split
(externalizing what the parts share), compile them with one clang each in parallel (-x ir -O<opt>
-mmacosx-version-min=11.0, the link's own clang taking the objects where it took the .ll), and remove
the parts and objects after. N is $LUDIC_JOBS, else min(cores, free GB / 1.5).

It needs an llvm-split and a clang of the same LLVM (Homebrew's LLVM 22 writes attributes Apple's
clang 17 cannot read): $LUDIC_LLVM, else /opt/homebrew/opt/llvm/bin. With either missing, on Windows
(its shell cannot run the parts at once yet), with LUDIC_SPLIT=0, or when a part fails, it compiles the
.ll whole as before.

$LUDIC_OPT=1 is a developer's faster build; ludic bundle sets LUDIC_OPT=2 for its compile whatever the
shell says.

Measured before the compile-only rule (this Mac, 12 cores, one build at a time):
- the game headless: 37-41 s -> 13-15.5 s (8 parts / by free memory), peak 2.1 GB -> 1.0-1.1 GB;
- the lab headless: 43.1 s -> 12.7 s, peak 2.4 GB -> 1.0 GB;
- the game at LUDIC_OPT=1, split: 11.8 s (fps cost not measured).
Both built and linked clean; the goldens and a headless shot of the result are not run here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:12:27 +03:00
..
assets.ludic feat(windows): the ludic CLI and ludic bundle on Windows 2026-09-13 03:01:33 +03:00
build.ludic ludic build on every core: the IR split with llvm-split and compiled by a clang per part at once 2026-09-29 17:12:27 +03:00
bundle.ludic ludic build on every core: the IR split with llvm-split and compiled by a clang per part at once 2026-09-29 17:12:27 +03:00
checks.ludic feat(tools): L10 ludic-fmt enforces a project's style 2026-09-24 14:38:35 +03:00
deps.ludic owned fields (25.5e): @owns(Kind) on a record's field, and owned_leaks 2026-09-28 17:01:28 +03:00
dev.ludic ludic build on every core: the IR split with llvm-split and compiled by a clang per part at once 2026-09-29 17:12:27 +03:00
docgen.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
docgen_check.ludic refactor(cli)!: split the contributor tool out of the ludic CLI 2026-09-05 23:15:12 +03:00
docgen_gen.ludic feat(windows): the ludic CLI and ludic bundle on Windows 2026-09-13 03:01:33 +03:00
forgejo.ludic feat(windows): the ludic CLI and ludic bundle on Windows 2026-09-13 03:01:33 +03:00
glgen.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
json.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
lsp_test.ludic feat(tooling): JetBrains IDE support, LSP navigation, barrel imports, package scripts and hooks 2026-09-16 16:13:31 +03:00
main.ludic ludic build on every core: the IR split with llvm-split and compiled by a clang per part at once 2026-09-29 17:12:27 +03:00
migrate.ludic feat(migrate): 0.R5 - ludic migrate state --tighten takes mut off every state parameter nothing down the chain writes; --root DIR lets the edits reach a directory without running its programs; a write through a local holding part of a mut state counts as a write to it 2026-09-27 00:20:44 +03:00
pack.ludic docs(packages): an index of the packages; the pack skips what is not a package directory 2026-09-25 07:22:05 +03:00
packignore.ludic feat(pack): .packignore, so a pack root can leave build artefacts out 2026-09-11 18:29:32 +03:00
pkg.ludic feat(tooling): JetBrains IDE support, LSP navigation, barrel imports, package scripts and hooks 2026-09-16 16:13:31 +03:00
pkg_test.ludic wip(0.S3): ui blocks, scene on enter/exit, hooks, machines over a state's field, namespace and engine-system injection; a reference out of a read-only state or a module let is read-only; deps counts writes into another module's state; the rejected examples hold states 2026-09-25 14:49:03 +03:00
prelude.ludic feat(test): ludic test -j N runs tests side by side 2026-09-25 11:38:09 +03:00
project.ludic feat(cli): ludic build --check / ludicc --check - check without building 2026-09-25 13:13:42 +03:00
release.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
scripts.ludic wip(0.S1, 0.S2): state records, mut and read-only state parameters, entry injection, module var refused; ludic migrate state 2026-09-25 13:45:09 +03:00
selfhost.ludic ludic build on every core: the IR split with llvm-split and compiled by a clang per part at once 2026-09-29 17:12:27 +03:00
selfhost_test.ludic wip(0.S1, 0.S2): state records, mut and read-only state parameters, entry injection, module var refused; ludic migrate state 2026-09-25 13:45:09 +03:00
shaders.ludic feat(render3d): the meadow's blades are culled on the GPU - under 1.5 ms of a MoltenVK frame for all the grass 2026-09-27 15:47:36 +03:00
split.ludic ludic build on every core: the IR split with llvm-split and compiled by a clang per part at once 2026-09-29 17:12:27 +03:00
test.ludic ludic.ui: <option disabled="{...}"> - a select steps past it, clamps off it and greys the arrow toward it 2026-09-29 16:01:43 +03:00
testpar.ludic feat(pkg): phase 15 - a package can carry a native library 2026-09-26 23:35:45 +03:00
toolchain.ludic wip(0.S1, 0.S2): state records, mut and read-only state parameters, entry injection, module var refused; ludic migrate state 2026-09-25 13:45:09 +03:00
tools.ludic feat(tools): L10 ludic-fmt enforces a project's style 2026-09-24 14:38:35 +03:00
vkgen.ludic feat(lang): L7 memory is safe unless it says unsafe 2026-09-24 12:53:27 +03:00