Tools/Saigo
Saigo is a modern toolchain for compiling Native Client applications.
Trivia
In Japanese, Saigo (さいご / 最後) means “the last”, “the end”, “the final” or “the conclusion”. This refers to the end of an era, the final stage of an event, or the last item in a sequence…
Native Client is not a Google thing anymore
Google publicly announced in May of 2017 the (then-)upcoming deprecation and abandonment of Native Client technologies in favor of WebAssembly, and announced the actual deprecation in 2020. But Google also supported Native Client-powered ChromeOS 138 until ChromeOS 139 in July of 2025 and as such continued developpement of some Native Client technologies. This extra development materialized in the maintenance of the loader and a toolchain named Saigo, frequently rebased on the latest LLVM upstream at the time. The loader received commits from Google until April of 2025, while Saigo received commits from Google until January of 2025 and the last rebase was over Clang 21.
Nothing about Native Client should be expected from Google anymore.
Contents
Status
The Unvanquished game code is already buildable with Saigo. Saigo is meant to replace PNaCl for Unvanquished release builds.
Components
The Saigo SDK consists of:
- C and C++ compilers based on Clang;
- Utilities like a linker, based on GNU binutils;
- A libc based on Newlib and a libc++ based on LLVM.
- Headers from the Native Client repositories.
The compiler supports latest C++ standards like C23 and C++23. Unlike PNaCl, Saigo compiles directly to .nexe.
Saigo may not support C++ exceptions as far as we know but supports setjmp/longjmp.
Sources
The project for rebuilding the Saigo Native Client SDK can be found there:
This project include patches applied over compiler and binutils repositories before building. This project builds Clang and binutils from Google repositories, and fetches headers from the our Native Client loader repository:
- https://chromium.googlesource.com/native_client/nacl-llvm-project-v10 (Saigo clang)
- https://chromium.googlesource.com/native_client/nacl-binutils (Saigo binutils)
- https://github.com/DaemonEngine/native_client (Native Client headers)
Breakpad support
Code compiled with Saigo uses -2 instead of -1 as value for the CFA pseudo-register.
We patched Breakpad to also support Saigo binaries, see this patch.
