# Building the release graphics stack The Vinix X11 sidecar uses indirect GLX from Mesa 24.0.9 and EGL, GLES and GBM from Mesa 24.2.8. Their Gallium libraries require LLVM 17.0.6 and 19.1.4 respectively. The new LLVM and Mesa packages still require full builds and guest rendering checks on each architecture. The [release ELF check](../tests/x11/README.md) records the public paths and the matching original files. Build each LLVM release with a native TableGen of the same version. `tools/vinix-llvm.v` checks the reported version and configures the native CPU backend and AMDGPU with shared LLVM, RTTI and exceptions. Install the matching `llvm17-dev` or `llvm19-dev` package in the Mesa build SDK for its headers and relocatable `llvm-config`. The runtime packages use Vinix’s `gcc-libs` and musl. Mesa 24.2.8 uses a native `intel_clc` to compile the built-in shaders for the x86 Iris driver. Build that generator from the same patched Mesa source on the build host, using LLVM/Clang 19, libclc, SPIRV-Tools and the matching SPIRV-LLVM-Translator. Put the resulting executable on the build host’s `PATH` and check its LLVM version with `intel_clc -M`. Mesa's cross build runs it with each Intel GPU generation and compiles the resulting shader tables into the driver. The release ARM configuration uses the ARM Gallium backends. The legacy GLX profile keeps Mesa 24.0.9’s software DRI server and its private LLVM 17 dependency. ## Sharing a builder Compile `tools/vinix-ninja.v` as `vinix-ninja` on the build host. Its default invocation delegates to Ninja with two jobs. On a shared Linux worker, open the existing build lock before starting vpac and pass that same file descriptor to its subprocesses. This example assumes the signed target SDK and build tools are already configured in the worker service. ```sh export VINIX_BUILD_LOCK="$worker_state/compile.lock" VINIX_BUILD_LOCK_FD=9 export VINIX_BUILD_SLICE_SECONDS=180 exec 9>>"$VINIX_BUILD_LOCK" flock -x 9 vpac --native-build "$ports/llvm19-libs/PKGBUILD.vile" "$receipts/llvm19.manifest" ``` The helper obtains the object prerequisites from Ninja’s graph and completes them in batches of eight. Once a batch exceeds the time slice, it hands the lock to waiting workers. The next batch resumes in the same verified source and build directory. Ninja rechecks the full requested dependency graph and runs the final links while holding the lock. The surrounding vpac process keeps ownership through its checks and archive creation. Monitor the build log for the last completed batch. A clean wait for the lock leaves the original vpac process alive. If the process or host is terminated, preserve its logs and start a fresh native build from the pinned recipe. Use the completed manifest, verify the archive digest, then sign and install it into a clean target root before using the result. A native vpac build of libdrm 2.4.123 yielded after 8, 24 and 32 of its 53 object targets on November 30. A second process acquired the same lock between batches. The calling process still held it after vpac wrote the archive. A check with an unrelated lock file failed. The test archive SHA-256 is `caec67ab38c181231b0ded61a570cd4c8bf3cdf1ec65fc72a8a76caa6306b8bb`. For Meson links driven by GCC, build `tools/vinix-time-ld.v` as `ld.lld` in a private directory, set `VINIX_REAL_LD` to the absolute path of the real linker and `VINIX_LINK_LOG` to an absolute output path, and add `-B/ -fuse-ld=lld` to the target link flags. GNU time records maximum resident KiB, elapsed seconds, exit status and the linker command. The worker linked and ran libbsd's endian test, recording 58,880 KiB for its successful link. A missing library produced a failure record and the compile-only step produced none. Receipts for both runs are in `~/.local/state/vinix/ports/musl-busybox-CqkBEA/xorg/worker/{ninja-sharing-01,timed-link-02}`.