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.

(From OE-Core rev: 521872ab2cac092c88446730772cb8c4e22b0cdc)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2022-09-11 16:28:44 -07:00
committed by Richard Purdie
parent fbc8f3d395
commit f212ad190c

View File

@@ -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")