-
Notifications
You must be signed in to change notification settings - Fork 213
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
__clear_cache
missing for aarch64-linux-android
#468
Comments
|
It is used from C code which is being compiled with the Some background that isn't entirely in the scope of this repository, but explains the situation I'm in: NDK r23 introduced a change that replaced I found that compiling with NDK r22 with or without |
@rust-lang/compiler @rust-lang/libs What exactly should the role of compiler-builtins be here? There are essentially 2 options:
Currently the status quo is an awkward mix of the above. We cover the symbols used by LLVM for rustc-generated code, but also symbols that are only used by C code (such as the long double libcall used by musl on aarch64). |
What are the trade-offs between these two options? Are there performance or codegen size costs to option 2? |
There are no performance or size costs to option 2: the linker will only include functions that are actually used. It's more of a maintenance concern: if we need to provide symbols needed by C code then we need to compile external C code as part of If you look at the README for this crate, you will see all the functions that we don't include for various reasons, mainly that rustc/LLVM isn't emitting calls to them. We would need to either provide Rust implementations for all of these or build the C version from LLVM's compiler-rt. |
I see, and we already do a mix of both, which seems functionally equivalent to an incremental version of option 2. @StackDoubleFlow, if we didn't add |
We already do a mix of both by necessity, for example to support uses of |
@yaahc I found that passing If I wanted to use |
@StackDoubleFlow Did you find a solution to this issue? I am only able to work around it by specifying the equivalent of |
Attempting to
dlopen
my shared library on an android device results in it being unable to find the__clear_cache
symbol. This is needed for my project.It is needed for me to build core for bbqsrc/cargo-ndk#22.
The text was updated successfully, but these errors were encountered: