Message ID | 20251017064415.3029758-1-raj.khem@gmail.com |
---|---|
State | New |
Headers | show |
Series | rust: Do not use use-libcxx | expand |
it needs another tweak for non-native builds, I will send a v2 later today On Thu, Oct 16, 2025 at 11:44 PM Khem Raj <raj.khem@gmail.com> wrote: > > 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 > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > Cc: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> > --- > meta/recipes-devtools/rust/rust_1.90.0.bb | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/meta/recipes-devtools/rust/rust_1.90.0.bb b/meta/recipes-devtools/rust/rust_1.90.0.bb > index 0319d73b930..b4fd690aab2 100644 > --- a/meta/recipes-devtools/rust/rust_1.90.0.bb > +++ b/meta/recipes-devtools/rust/rust_1.90.0.bb > @@ -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")
diff --git a/meta/recipes-devtools/rust/rust_1.90.0.bb b/meta/recipes-devtools/rust/rust_1.90.0.bb index 0319d73b930..b4fd690aab2 100644 --- a/meta/recipes-devtools/rust/rust_1.90.0.bb +++ b/meta/recipes-devtools/rust/rust_1.90.0.bb @@ -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")
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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> --- meta/recipes-devtools/rust/rust_1.90.0.bb | 2 -- 1 file changed, 2 deletions(-)