rust: Use libc++ runtime when using clang with llvm runtime
PATCH v3 1/1 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.
---
v2: Rebase now that 1.63 is in
v3: Use renamed variable RUNTIME -> TC_CXX_RUNTIME
meta/recipes-devtools/rust/rust.inc | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/rust/rust.inc +2 -0
@@ -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', True) or ""): + config.set("llvm", "use-libcxx", e(True)) # [rust] config.add_section("rust")
Signature · 1 line
2.37.3
Quoted 19 lines · 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 <[email protected]>---
v2: Rebase now that 1.63 is in
v3: Use renamed variable RUNTIME ->TC_CXX_RUNTIMEmeta/recipes-devtools/rust/rust.inc | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-devtools/rust/rust.inc +0
-0
meta/recipes-devtools/rust/rust.inc python do_configure() { · line 117
Quoted 8 lines
meta/recipes-devtools/rust/rust.inc +2
-0@@ -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', True) or ""): + config.set("llvm", "use-libcxx", e(True)) # [rust] config.add_section("rust")
We can drop the True from the getVar as expansion is the default.
Cheers,
Richard