rust: Do not use use-libcxx
PATCH 1/1 rust: Do not use use-libcxx
use-libcxx is effective to use libcxx as standard C++ runtime with the llvm which is built internally with rust compiler, however, we have changed rust toolchain to use external llvm built with llvm-native so this option is not effective, moreover, it passes wrong expectation to rust compiler of C++ runtime and it ends up with mising symbol errors because it emits symbols to one c++ library (libc++) but it is linked with libstdc++ and vice versa
Fixes
x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-06cb1cc41094667b.so: undefined symbol: _ZTINSt13__future_base12_Result_baseE
--- meta/recipes-devtools/rust/rust_1.90.0.bb | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-devtools/rust/rust_1.90.0.bb +0 -2
@@ -126,8 +126,6 @@ python do_configure() { config.add_section("llvm") config.set("llvm", "static-libstdcpp", e(False)) config.set("llvm", "download-ci-llvm", e(False)) - if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""): - config.set("llvm", "use-libcxx", e(True)) # [rust] config.add_section("rust")
it needs another tweak for non-native builds, I will send a v2 later today
Quoted 33 lines · Khem Raj
use-libcxx is effective to use libcxx as standard C++ runtime with the llvm which is built internally with rust compiler, however, we have changed rust toolchain to use external llvm built with llvm-native so this option is not effective, moreover, it passes wrong expectation to rust compiler of C++ runtime and it ends up with mising symbol errors because it emits symbols to one c++ library (libc++) but it is linked with libstdc++ and vice versa
Fixes
x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-06cb1cc41094667b.so: undefined symbol:_ZTINSt13__future_base12_Result_baseESigned-off-by Khem Raj <[email protected]>Cc Deepesh Varatharajan <[email protected]>--- meta/recipes-devtools/rust/rust_1.90.0.bb | 2 -- 1 file changed, 2 deletions(-)meta/recipes-devtools/rust/rust_1.90.0.bb +0
-2@@ -126,8 +126,6 @@ python do_configure() { config.add_section("llvm") config.set("llvm", "static-libstdcpp", e(False)) config.set("llvm", "download-ci-llvm", e(False)) - if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""): - config.set("llvm", "use-libcxx", e(True)) # [rust] config.add_section("rust")