The GNU ABI runtime can be built without the Switch runtime or its graphics and media packages:
cmake -S . -B build/gnuabi -DSNX_BUILD_NX=OFF -DSNX_BUILD_GNUABI=ON
cmake --build build/gnuabi
ctest --test-dir build/gnuabi --output-on-failure
Both runtimes are enabled by default. The NX runtime always requires SDL3, Vulkan and FFmpeg. Windows uses the existing llvm-mingw toolchain and bootstrap environment described in Build.
build/gnuabi/scarletnx-gnuabi [options] [--] PROGRAM [arguments...]
build/gnuabi/scarletnx-gnuabi -L ~/aarch64-sysroot ./hello
PROGRAM is a host path. Arguments after it are passed to the guest, with the host's
environment (-E VAR=VALUE sets a variable and -U VAR removes one, as with QEMU).
-0 ARGV0 replaces the program's argv[0]. --help lists every option. Of the common options of
every driver, it takes --data, -h, -O (its JIT's level, as --jit-opt), --jit-cache DIR (the folder its JIT
keeps code in between runs) and --jit-only, what it does anyway.
| Option | Effect |
|---|---|
-L DIR, --sysroot=DIR | The guest's root (see below) |
--data DIR | The data folder, whose linux/ is the guest's root when neither -L nor --sysroot names one |
--isolated | No host files: /tmp in memory and the program alone as /program, the namespace the unit tests use |
--jit (default) | Compile the guest's code in process as it runs, the only mode |
--jit-cache DIR, --no-jit-cache | Where compiled code is kept between runs (default linux-jit in the user's cache folder) |
--verbose-jit | A line for each piece of code compiled, and how long it took |
--strace | Every system call, its arguments and its result on stderr, prefixed with the process id |
--sample-pc | The guest's program counter on stderr once a second, for a loop that makes no system call (not on Windows) |
--host-page=N | Work as a host with N-byte pages, a power of two from the host's page to 1048576 (not on Windows, tests) |
These but -E, -U, -0 and --jit-cache are settings too, the launcher's Settings > Linux, which it passes to a
run (--linux-strace=1, Settings): the last given counts.
Made from docs/platforms/gnuabi/README.md at 69237645142c. GPL-3.0-or-later.