| Message ID | 20251104171611.2227798-3-elmehdi.younes@smile.fr |
|---|---|
| State | New |
| Headers | show |
| Series | Add rust-for-linux option for linux-yocto | expand |
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index 4d0a726bb6..40e5bf214b 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -95,3 +95,7 @@ do_devshell:prepend() { d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1") d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR") } + +KERNEL_FEATURES:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', ' rust.scc', '', d)}" +# TODO: Kernel rust code compilation breaks under ccache, disable it for now +CCACHE_DISABLE = "${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', '1', '', d)}"
This adds the mechanism to enable the Rust for Linux kernel feature via a DISTRO_FEATURE. When 'rust-kernel' is present in DISTRO_FEATURES, the 'rust.scc' kernel feature is appended to the KERNEL_FEATURES list. Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr> --- meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++ 1 file changed, 4 insertions(+)