-
Notifications
You must be signed in to change notification settings - Fork 440
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
Search for standalone toolchain first #32
Comments
…t (not CMake) ANDROID_NDK partially address #32
Hi @ayberkozgur, I'm pretty like the current preference of regular NDK over a standalone toolchain. However I find weird that having defined By the way I think about complete removal of standalone toolchain support from the cmake toolchain file. I personally don't see any benefits from building with cmake + standalone toolchain when you anyway have a regular NDK. So is there anything except "used to it" that makes you to prefer standalone toolchain? |
@taka-no-me Well, I think most people have About removing the support for standalone toolchain, I'd strongly advise against it. The main reason we use it is because we have projects with a lot of dependencies that we want to build and install into the sysroot of the standalone toolchain before we can build more libraries that are dependencies of further other libraries. This is very clean and easy to use, and it cannot be done with a regular NDK cleanly because it has no real sysroot. |
It may sound nonsense but you can build with regular NDK and install into the sysroot of standalone toolchain. Unless you mix different variants of STL it should work perfectly fine. It also nicely works with CMake's dependencies as it searches under Long command lines are annoying and as for me
|
I didn't know |
About the scope of this issue, what is your opinion about the search order of regular vs. standalone toolchains? Also, can you open an issue before removing standalone toolchain support if you ever decide to do it so that other people can discuss this too, since this is quite a big change? Thank you very much. |
Indeed the standalone toolchain has simpler inner structure than NDK, but the majority of Android developers is not supposed to deal with NDK internals. Newcomers are not meant neither study NDK structure not learn how to extract a standalone toolchain. They are expected to have cmake+NDK working out of the box. From my point of view standalone toolchain support is the buggiest and most divergent from mainstream ndk-build part of android-cmake which exists mostly for historical reasons rather than by real need. Currently I don't know any features that are supported with standalone toolchain and are not implemented for regular NDK but the opposite cases do exist. So removal of standalone toolchain related logic will simplify the maintenance and addition of new features. As for the search order, I'm not going to make any further changes to it (in fact I plan adding more search methods for NDK). If both NDK and standalone toolchain are available then NDK must be chosen. |
I can understand the maintenance considerations, and for our case, Closing this issue. |
Currently,
ANDROID_NDK
has priority overANDROID_STANDALONE_TOOLCHAIN
. As far as I know, there are two main environment setups that NDK devs use :For people like me who prefer option 2, regular NDK priority over standalone is an inconvenience, due to private installed libs not being found in regular NDK paths, which would be solved by inverting this priority. This inversion does not affect people (probably the majority) who use option 1.
The text was updated successfully, but these errors were encountered: