On Mon, 2022-08-22 at 14:10 -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 <[email protected]>
> ---
> meta/recipes-devtools/rust/rust.inc | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/rust/rust.inc
> b/meta/recipes-devtools/rust/rust.inc
> index 284347dedc..c288903c9b 100644
> --- a/meta/recipes-devtools/rust/rust.inc
> +++ b/meta/recipes-devtools/rust/rust.inc
> @@ -73,6 +73,7 @@ python do_configure() {
>
> # [target.ARCH-poky-linux]
> host_section = "target.{}".format(d.getVar('RUST_HOST_SYS', True))
> + runtime = "target.{}".format(d.getVar('RUNTIME', True))
> config.add_section(host_section)
>
> llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}")
> @@ -107,6 +108,8 @@ python do_configure() {
> # [llvm]
> config.add_section("llvm")
> config.set("llvm", "static-libstdcpp", e(False))
> + if "llvm" in runtime:
> + config.set("llvm", "use-libcxx", e(True))
>
I think it is a little bit over complicated, couldn't it just be:
if "llvm" in (d.getVar('RUNTIME', True) or ""):
config.set("llvm", "use-libcxx", e(True))
I'd much rather we did some kind of indirection via a variable too
since I'm not sure OE-Core knows anything about RUNTIME, or that
RUNTIME is a particularly good choice of name for the core.
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169686):
https://lists.openembedded.org/g/openembedded-core/message/169686
Mute This Topic: https://lists.openembedded.org/mt/93191457/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-