All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] rust: Use libc++ runtime when using clang with llvm runtime
@ 2022-09-01 20:32 Khem Raj
  2022-09-01 21:56 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2022-09-01 20:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

meta-clang has options when it comes to C++ runtime, default is to use
gnu runtime, other options are llvm runtime and android runtime. This
patch helps when a distro is using llvm runtime for C/C++ runtime. It
informs the rust build system about right C++ runtime to configure for
when such a setting is used.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Rebase now that 1.63 is in

 meta/recipes-devtools/rust/rust.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index 284347dedc..3a7b993ee8 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -107,6 +107,8 @@ python do_configure() {
     # [llvm]
     config.add_section("llvm")
     config.set("llvm", "static-libstdcpp", e(False))
+    if "llvm" in (d.getVar('RUNTIME', True) or ""):
+        config.set("llvm", "use-libcxx", e(True))
 
     # [rust]
     config.add_section("rust")
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v2] rust: Use libc++ runtime when using clang with llvm runtime
  2022-09-01 20:32 [PATCH v2] rust: Use libc++ runtime when using clang with llvm runtime Khem Raj
@ 2022-09-01 21:56 ` Richard Purdie
  2022-09-01 23:12   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2022-09-01 21:56 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On Thu, 2022-09-01 at 13:32 -0700, Khem Raj wrote:
> meta-clang has options when it comes to C++ runtime, default is to use
> gnu runtime, other options are llvm runtime and android runtime. This
> patch helps when a distro is using llvm runtime for C/C++ runtime. It
> informs the rust build system about right C++ runtime to configure for
> when such a setting is used.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> v2: Rebase now that 1.63 is in
> 
>  meta/recipes-devtools/rust/rust.inc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
> index 284347dedc..3a7b993ee8 100644
> --- a/meta/recipes-devtools/rust/rust.inc
> +++ b/meta/recipes-devtools/rust/rust.inc
> @@ -107,6 +107,8 @@ python do_configure() {
>      # [llvm]
>      config.add_section("llvm")
>      config.set("llvm", "static-libstdcpp", e(False))
> +    if "llvm" in (d.getVar('RUNTIME', True) or ""):
> +        config.set("llvm", "use-libcxx", e(True))
>  
>      # [rust]
>      config.add_section("rust")

My concerns about "RUNTIME" as a variable in OE-Core stand. We need to
figure out the naming properly for this before it is used here.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v2] rust: Use libc++ runtime when using clang with llvm runtime
  2022-09-01 21:56 ` [OE-core] " Richard Purdie
@ 2022-09-01 23:12   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2022-09-01 23:12 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Thu, Sep 1, 2022 at 2:56 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Thu, 2022-09-01 at 13:32 -0700, Khem Raj wrote:
> > meta-clang has options when it comes to C++ runtime, default is to use
> > gnu runtime, other options are llvm runtime and android runtime. This
> > patch helps when a distro is using llvm runtime for C/C++ runtime. It
> > informs the rust build system about right C++ runtime to configure for
> > when such a setting is used.
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > v2: Rebase now that 1.63 is in
> >
> >  meta/recipes-devtools/rust/rust.inc | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
> > index 284347dedc..3a7b993ee8 100644
> > --- a/meta/recipes-devtools/rust/rust.inc
> > +++ b/meta/recipes-devtools/rust/rust.inc
> > @@ -107,6 +107,8 @@ python do_configure() {
> >      # [llvm]
> >      config.add_section("llvm")
> >      config.set("llvm", "static-libstdcpp", e(False))
> > +    if "llvm" in (d.getVar('RUNTIME', True) or ""):
> > +        config.set("llvm", "use-libcxx", e(True))
> >
> >      # [rust]
> >      config.add_section("rust")
>
> My concerns about "RUNTIME" as a variable in OE-Core stand. We need to
> figure out the naming properly for this before it is used here.
>

Thats fine, do you see any other issue, I have addressed your other
feedback. May be we should call it
CL_RUNTIME which stands for compiler-language rumtime or we can call

<lang>_RUNTIME which in this case will be CXX_RUNTIME

> Cheers,
>
> Richard
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-01 23:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 20:32 [PATCH v2] rust: Use libc++ runtime when using clang with llvm runtime Khem Raj
2022-09-01 21:56 ` [OE-core] " Richard Purdie
2022-09-01 23:12   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.