From: Khem Raj Date: Sun, 11 Sep 2022 23:28:44 +0000 (-0700) Subject: rust: Use libc++ runtime when using clang with llvm runtime X-Git-Tag: 2022-10~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=521872ab2cac092c88446730772cb8c4e22b0cdc;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git rust: Use libc++ runtime when using clang with llvm runtime 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 Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index a33eb00e25f..956301023a0 100644 --- a/meta/recipes-devtools/rust/rust.inc +++ b/meta/recipes-devtools/rust/rust.inc @@ -110,6 +110,8 @@ python do_configure() { # [llvm] config.add_section("llvm") config.set("llvm", "static-libstdcpp", e(False)) + if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""): + config.set("llvm", "use-libcxx", e(True)) # [rust] config.add_section("rust")