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

Android LTO: clang toolchain #316

Closed
ruslo opened this issue Feb 22, 2017 · 10 comments
Closed

Android LTO: clang toolchain #316

ruslo opened this issue Feb 22, 2017 · 10 comments
Assignees
Labels
Milestone

Comments

@ruslo
Copy link
Collaborator

ruslo commented Feb 22, 2017

From Gitter:

after gcc didn't "just work", I tried clang quickly. for clang toolchains,
it is necessary to make symlinks from *.dylib files (to *.so) for OS X.
> cd android-ndk-r11c/toolchains/llvm/prebuilt/darwin-x86_64/lib64/
> ln -s LLVMgold.dylib LLVMgold.so

From android/ndk#108

@ruslo ruslo added this to the 0.4 milestone Feb 22, 2017
@ruslo ruslo self-assigned this Feb 22, 2017
@ruslo
Copy link
Collaborator Author

ruslo commented Feb 22, 2017

Got similar problem with clang-lto on Linux:

 /usr/bin/ld: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so: error loading
  plugin: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so: cannot open shared object
  file: No such file or directory

@ruslo
Copy link
Collaborator Author

ruslo commented Feb 24, 2017

Will start with android-ndk-r10e-api-16-armeabi-v7a-neon-clang-35-hid-sections-lto
(based on #310 (comment)).

@ruslo
Copy link
Collaborator Author

ruslo commented Mar 10, 2017

@ruslo
Copy link
Collaborator Author

ruslo commented Mar 10, 2017

@headupinclouds
Copy link
Collaborator

I will grab it. I believe this has a complete libc++ as well.

@ruslo
Copy link
Collaborator Author

ruslo commented Mar 11, 2017

Downloading r14...

Looks good!

Example from NDK

For armv7a there is no need to use -fuse-ld=gold but we need this for arm-v8a because of "format not recognized" error. -fuse-ld=gold works for armv7a too so I'm setting it unconditionally always for Clang, see branch https://github.com/ruslo/polly/commits/pr.android.lto:

@ruslo
Copy link
Collaborator Author

ruslo commented Mar 11, 2017

Will start with android-ndk-r10e-api-16-armeabi-v7a-neon-clang-35-hid-sections-lto
(based on #310 (comment)).

Adding NDK r14 variants of those toolchains:

@ruslo
Copy link
Collaborator Author

ruslo commented Mar 17, 2017

Toolchains is in Polly master now, closing.

@ruslo ruslo closed this as completed Mar 17, 2017
@headupinclouds
Copy link
Collaborator

Thanks!

@headupinclouds
Copy link
Collaborator

I guess we just wait for NDK/LLVM updates for -Os now.

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

No branches or pull requests

2 participants