Skip to content

Android: switch the archiver for static libraries over to llvm-ar #897

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

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

finagolfin
Copy link
Member

I just added this to a larger pull, swiftlang/swift#39921, that updates the compiler repo to use Android NDK 23, which got rid of binutils, so updating the archiver here too. Not too important when cross-compiling, as you can still use the system ar just fine, but when natively compiling in the Termux app on Android, llvm-ar is now the default archiver there.

I also had to patch llbuild to get SPM to use llvm-ar, otherwise it just uses the first ar it finds in the system PATH. @neonichu, this means SPM doesn't use the --toolchain or -Xswiftc -tools-directory paths passed in for static library products that call the archiver, seemingly breaking that contract. Obviously not too important, as any archiver will do, but when the name changes like it does natively on Android, I had to patch llbuild too.

@artemcm
Copy link
Contributor

artemcm commented Nov 9, 2021

@swift-ci please test

@finagolfin
Copy link
Member Author

Upstream pull was just merged, this can go in now.

@artemcm
Copy link
Contributor

artemcm commented Nov 18, 2021

@swift-ci please test

@artemcm artemcm merged commit 98e41d0 into swiftlang:main Nov 18, 2021
@finagolfin finagolfin deleted the ar branch November 19, 2021 02:27
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