Building your kernels and drivers with Bazel
Support ABI monitoring (Device)
Building against downloaded prebuilts
Bzlmod support (also: setting up workspace)
Building compile_commands.json
Discover newest Kleaf features in Canary
--config=fast
: Make local builds faster
--config=local
: Sandboxing
--config=release
: Release builds
--config=stamp
: Handling SCM version
--config=canary
: Kleaf Canary Features
--config=musl
: Use musl libc for host binaries
For a full list of flags, run
$ tools/bazel help kleaf
--gcov
: Keep GCOV files
--kasan
: kasan
--kbuild_symtypes
: KBUILD_SYMTYPES
--kgdb
: GDB scripts
--lto
: Configure LTO during development
--notrim
: Disables TRIM_NONLISTED_KMI
globally.
--btf_debug_info
: Enable/disable BTF debug information
--gki_build_config_fragment
: Supporting GKI_BUILD_CONFIG_FRAGMENT on Kleaf
--defconfig_fragment
: Defconfig fragments
Other flags for debugging and disabling integrity checks may be found in the Debugging Kleaf page.