]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
rust: Use libc++ runtime when using clang with llvm runtime
authorKhem Raj <raj.khem@gmail.com>
Sun, 11 Sep 2022 23:28:44 +0000 (16:28 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Sep 2022 07:33:35 +0000 (08:33 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/rust/rust.inc

index a33eb00e25f9893eb749cc6bb4a1552091803d88..956301023a05708fb344110c8c25bc71e212d000 100644 (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")