-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting _Unwind_* symbols from libstd #62088
Comments
It probably make sense to still export C symbols which are exported from Rust crates. A workaround might be to export a dummy generic function in |
I tried the suggested workaround but it doesn't seem to be working. |
I see we only export C symbols if |
FWIW I think that the original change here only affects rust dylibs, when using rlibs we already limited symbols pretty aggressively and AFAIK it's only dylibs which were tweaked. Additionally basically the only project in the world using Rust dylibs is rustc, so the breakage here at least makes sense in that regard and I don't think is cause for alarm yet in terms of maybe there's more breakage lurking. That being said we should still fix this particular use case! I think @Zoxc is right in that if rustc determines that a C symbol is both statically linked into a Rust dylib (which it deduces via a @petrhosek if that's too vague though I can try to dig in more to actually remember the incantation here. |
When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue rust-lang#62088.
… r=tmandry Use link attributes on extern "C" blocks with llvm-libuwind When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue rust-lang#62088.
… r=tmandry Use link attributes on extern "C" blocks with llvm-libuwind When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue rust-lang#62088.
… r=tmandry Use link attributes on extern "C" blocks with llvm-libuwind When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue rust-lang#62088.
… r=tmandry Use link attributes on extern "C" blocks with llvm-libuwind When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue rust-lang#62088.
… r=tmandry Use link attributes on extern "C" blocks with llvm-libuwind When llvm-libunwind feature is enabled, we need to use link attribute on extern "C" blocks to make sure that symbols provided by LLVM's libunwind that's built as part of Rust's libunwind crate are re-exported. This addresses issue rust-lang#62088.
I believe this was fixed by #62287; closing. |
We use the
llvm-unwind
feature which means that we build LLVM's libunwind and statically link it into Rust's libunwind. This is critical for our use cases because there's no system unwinder (e.g. libunwind or libgcc) available on systems we target (both Linux and Fuchsia).dbebcee changed the Rust backend behavior where it no longer exports C symbols from rlibs and dylibs. This means that libstd no longer exports
_Unwind_*
symbols (that came from LLVM's libunwind which was built as part unwind rlib) and since no other library provides these symbols in our Rust toolchain, any crate that uses unwinding fails to link, most notablyrustc
itself:While I think that dbebcee behavior is desirable in general, it's undesirable in this specific case and I'd like to somehow mark
_Unwind_*
symbols to be exported ifllvm-unwind
feature is enabled, but I haven't found a way to do so.cc @alexcrichton @Zoxc @cramertj @tmandry
The text was updated successfully, but these errors were encountered: