From: Yoann Congal <[email protected]> Conditioned to the "rust-linux" DISTRO_FEATURES: * Add dependency to rust-native * Remap ${S} in compiled output to avoid buildpath errors
Signed-off-by: Yoann Congal <[email protected]> Signed-off-by: Harish Sadineni <[email protected]> --- meta/classes-recipe/module.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta/classes-recipe/module.bbclass b/meta/classes-recipe/module.bbclass index 4948e995c5..7dbd4194d1 100644 --- a/meta/classes-recipe/module.bbclass +++ b/meta/classes-recipe/module.bbclass @@ -87,3 +87,11 @@ EXPORT_FUNCTIONS do_compile do_install KERNEL_MODULES_META_PACKAGE = "${PN}" FILES:${PN} = "" ALLOW_EMPTY:${PN} = "1" + +# Rust module support +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', 'rust-native', '', d)}" + +RUST_DEBUG_REMAP ?= "--remap-path-prefix=${S}=${TARGET_DBGSRC_DIR}" +KRUSTFLAGS:append = " ${RUST_DEBUG_REMAP}" +EXTRA_OEMAKE:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', \ + ' KRUSTFLAGS="${KRUSTFLAGS}"', '',d)}" -- 2.49.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#229780): https://lists.openembedded.org/g/openembedded-core/message/229780 Mute This Topic: https://lists.openembedded.org/mt/117368082/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
