diff mbox series

[scarthgap,18/18] rust: Add new varaible RUST_ENABLE_EXTRA_TOOLS

Message ID 136a25567499191b23a4d000a06bf83a473224ca.1722790925.git.steve@sakoman.com
State Accepted
Delegated to: Steve Sakoman
Headers show
Series [scarthgap,01/18] libstd-rs,rust-cross-canadian: set CVE_PRODUCT to rust | expand

Commit Message

Steve Sakoman Aug. 4, 2024, 5:09 p.m. UTC
From: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>

There is a need to enable some extra tools from the rust for the build
and so this new variable will help for that

This varaible then we can use during do_configure task to add overall
values as per json format in build -> tools

Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-devtools/rust/rust_1.75.0.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Richard Purdie Aug. 4, 2024, 9:32 p.m. UTC | #1
On Sun, 2024-08-04 at 10:09 -0700, Steve Sakoman via
lists.openembedded.org wrote:
> From: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
> 
> There is a need to enable some extra tools from the rust for the
> build
> and so this new variable will help for that
> 
> This varaible then we can use during do_configure task to add overall
> values as per json format in build -> tools
> 
> Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
> Signed-off-by: Steve Sakoman <steve@sakoman.com>
> ---
>  meta/recipes-devtools/rust/rust_1.75.0.bb | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Not sure this is on master?

Cheers,

Richard
Marko, Peter Aug. 5, 2024, 8:47 a.m. UTC | #2
-----Original Message-----
From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie via lists.openembedded.org
Sent: Sunday, August 4, 2024 23:33
To: steve@sakoman.com; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][scarthgap 18/18] rust: Add new varaible RUST_ENABLE_EXTRA_TOOLS

> On Sun, 2024-08-04 at 10:09 -0700, Steve Sakoman via
> lists.openembedded.org wrote:
> > From: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
> > 
> > There is a need to enable some extra tools from the rust for the
> > build
> > and so this new variable will help for that
> > 
> > This varaible then we can use during do_configure task to add overall
> > values as per json format in build -> tools
> > 
> > Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
> > Signed-off-by: Steve Sakoman <steve@sakoman.com>
> > ---
> >  meta/recipes-devtools/rust/rust_1.75.0.bb | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
>
> Not sure this is on master?
>
> Cheers,
>
> Richard

This was already explained here:
https://lists.openembedded.org/g/openembedded-core/message/202732

Peter
Richard Purdie Aug. 5, 2024, 9:02 a.m. UTC | #3
On Mon, 2024-08-05 at 08:47 +0000, Marko, Peter wrote:
> -----Original Message-----
> From:
> openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org
> > On Behalf Of Richard Purdie via lists.openembedded.org
> Sent: Sunday, August 4, 2024 23:33
> To: steve@sakoman.com; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][scarthgap 18/18] rust: Add new varaible
> RUST_ENABLE_EXTRA_TOOLS
> 
> > On Sun, 2024-08-04 at 10:09 -0700, Steve Sakoman via
> > lists.openembedded.org wrote:
> > > From: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
> > > 
> > > There is a need to enable some extra tools from the rust for the
> > > build
> > > and so this new variable will help for that
> > > 
> > > This varaible then we can use during do_configure task to add
> > > overall
> > > values as per json format in build -> tools
> > > 
> > > Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
> > > Signed-off-by: Steve Sakoman <steve@sakoman.com>
> > > ---
> > >  meta/recipes-devtools/rust/rust_1.75.0.bb | 6 +++++-
> > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > Not sure this is on master?
> > 
> > Cheers,
> > 
> > Richard
> 
> This was already explained here:
> https://lists.openembedded.org/g/openembedded-core/message/202732

Fair enough, thanks!

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/rust_1.75.0.bb b/meta/recipes-devtools/rust/rust_1.75.0.bb
index 76e1fe2d84..c33f31d261 100644
--- a/meta/recipes-devtools/rust/rust_1.75.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.75.0.bb
@@ -70,6 +70,10 @@  addtask do_test_compile after do_configure do_rust_gen_targets
 do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot"
 do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
 
+# there is a need to enable some more rust tools for the project
+# We can extend a list of more tools via this variable
+RUST_ENABLE_EXTRA_TOOLS ?= "rust-demangler"
+
 python do_configure() {
     import json
     import configparser
@@ -141,7 +145,7 @@  python do_configure() {
     config.add_section("build")
     config.set("build", "submodules", e(False))
     config.set("build", "docs", e(False))
-    config.set("build", "tools", ["rust-demangler",])
+    config.set("build", "tools", e(d.getVar("RUST_ENABLE_EXTRA_TOOLS").split()))
 
     rustc = d.expand("${WORKDIR}/rust-snapshot/bin/rustc")
     config.set("build", "rustc", e(rustc))