This change adds support for Rust-enabled kernel builds by:
-Extending do_kernel_configme dependencies to include rust-native,
clang-native, and bindgen-cli-native.
-Invoking make rustavailable during do_kernel_configme() to prepare the
kernel build environment for Rust.
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
--- /dev/null
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+RUST_KERNEL_TASK_DEPENDS ?= "rust-native:do_populate_sysroot clang-native:do_populate_sysroot bindgen-cli-native:do_populate_sysroot"
+do_kernel_configme[depends] += "${RUST_KERNEL_TASK_DEPENDS}"
+
+do_kernel_configme:append () {
+ oe_runmake -C ${S} O=${B} rustavailable
+}
# SPDX-License-Identifier: MIT
#
+inherit_defer ${@bb.utils.contains('KERNEL_FEATURES', 'rust', 'kernel-yocto-rust', '', d)}
+
# remove tasks that modify the source tree in case externalsrc is inherited
SRCTREECOVEREDTASKS += "do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch do_unpack do_patch"
PATCH_GIT_USER_EMAIL ?= "kernel-yocto@oe"