Skip to content
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

link builtins for android x86_64 targets #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

conor-eg
Copy link

@conor-eg conor-eg commented Sep 9, 2023

Applying the work around for android x86_64 compile failures.
Uses glob to find correct directory without having to worry about the different versions of ndk included tools.
Should at very least work on linux and macos

This does require the ANDROID_NDK_HOME env variable to be set

@vadim-eg
Copy link

It would be illuminating to have some details what went wrong and how the fix fixes it - not sure I'm quite getting it.
Normally nobody knows anyway how stuff like this works,so no big loss, but if there is something to learn, good to make it available.

@conor-eg
Copy link
Author

conor-eg commented Sep 10, 2023

Some light Saturday night reading from various other issues opened for this:

mozilla/application-services#5436 (this is the issue where this work around comes from I believe).

I think this comment summarizes it

No, it's statically linked to libclang_rt.builtins, which contains the symbol. clang does that automatically. The problem is that rust explicitly tells it not to do that with -nodefaultlibs, and passes its own compiler-builtins instead, but completely ignores that it's not alone and that the crate could very well be building C code that uses symbols that aren't in its compiler-builtins but are in the C compiler ones.

bug opened against rust: rust-lang/rust#109717

more explanations
zcash/librustzcash#800
mozilla/rust-android-gradle#105 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants