Files
rk35xx-android14/external/swiftshader/docs/Subzero.md
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

1.7 KiB

Subzero Documentation

Subzero is a JIT compiler used as a back-end for Reactor. It originates from Chrome's Portable Native Client project. Its authoritative repository is at https://chromium.googlesource.com/native_client/pnacl-subzero/.

Subzero for SwiftShader

SwiftShader contains a fork of the Subzero source code (at the time of writing they are in sync). It is an alternative JIT compiler back-end, with LLVM still being the default for CMake builds. To build SwiftShader with Subzero instead of LLVM, specify -DREACTOR_BACKEND=Subzero in your CMake command (or change LLVM to Subzero in the CMake GUI). For Chrome builds that use the BUILD.gn files, Subzero is the default as it produces significantly smaller binaries than with LLVM.

Subzero Development

Development on Subzero itself requires setting up the NaCl environment on a Linux system to be able to run its unit tests:

  • Install Chrome's depot_tools.
  • Run mkdir nacl && cd nacl && fetch nacl (ref).
  • Run native_client/toolchain_build/toolchain_build_pnacl.py --verbose --sync --clobber --install toolchain/linux_x86/pnacl_newlib_raw (ref).
  • Run all unit tests with make -f Makefile.standalone check (ref).