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

ndk-build: Use LLVM binutils when GNU binutils are removed (r23+) #137

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

MarijnS95
Copy link
Member

Since r21 LLVM binutils are included for testing;
Since r22 GNU binutils are deprecated in favour of LLVM's;
Since r23 GNU binutils have been removed.

When GNU binutils are not available (<triple>-<bin_name>) "fall back" to llvm-<bin_name> binaries from LLVM binutils that are now included with the NDK.

To maintain stability with the current ndk-build crate release, prefer GNU binutils for as long as it is provided by the NDK instead of trying to use llvm-<bin_name> from r21 onwards.

Fixes #135


We could also opt for LLVM binutils in r22 (requires extra logic to figure out whether we're building on r21 or r22) where GNU binutils are technically deprecated, but since the current crate release already uses that successfully there seems no need to change it at risk of breaking projects that are somehow incompatible.

ndk-build/src/ndk.rs Outdated Show resolved Hide resolved
Since [r21] LLVM binutils are included _for testing_;
Since [r22] GNU binutils are deprecated in favour of LLVM's;
Since [r23] GNU binutils have been removed.

When GNU binutils are not available (`<triple>-<bin_name>`) "fall back"
to `llvm-<bin_name>` binaries from LLVM binutils that are now included
with the NDK.

To maintain stability with the current ndk-build crate release, prefer
GNU binutils for as long as it is provided by the NDK instead of trying
to use `llvm-<bin_name>` from r21 onwards.

[r21]: https://github.com/android/ndk/wiki/Changelog-r21
[r22]: https://github.com/android/ndk/wiki/Changelog-r22
[r23]: https://github.com/android/ndk/wiki/Changelog-r23

Fixes rust-mobile#135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants