You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libc++ linker scripts incorrect for LP32 API 21+ #672
Since we only ship one libc++ linker script set (one shared, one static) in the NDK, this script no longer works for the case where libandroid_support is not used for the target API level. make_standalone_toolchain.py won't copy libandroid_support for android-21+ since it is not needed, but the LP32 linker scripts assume it is needed because it is for earlier API levels.
I think the right solution here is to either ship multiple linker scripts (libc++.so.16, libc++.so.17, etc) for each supported API level, or to just remove them from the NDK distribution and let make_standalone_toolchain.py generate them.
Since we're so late in the r17 release cycle, I don't think we should alter the existing linker scripts since it seems likely that non-standalone toolchain users of them already have libandroid_support on the path, and in the short term we should avoid breaking their use case since the downsides of linking libandroid_support when it is not needed are small.
For r17, we'll switch to having make_standalone_toolchain.py generating its own linker scripts but also preserve the existing linker scripts in the NDK. For r18 we'll either remove them or generate one per API level.
While uglier implementation-wise than generating fresh linker scripts, I think we're better off having make_standalone_toolchain.py do a rewrite of the linker scripts after copying them since that will avoid issues where we update one template and forget to update the other.
Activity
DanAlbert commentedon Apr 16, 2018
While uglier implementation-wise than generating fresh linker scripts, I think we're better off having
make_standalone_toolchain.pydo a rewrite of the linker scripts after copying them since that will avoid issues where we update one template and forget to update the other.DanAlbert commentedon Apr 17, 2018
https://android-review.googlesource.com/c/platform/ndk/+/665595 is the r17 fix for this. Moving the cleanup to r18.
DanAlbert commentedon May 2, 2018
Cleanup merged into master for r18. There's now a set of libc++.so.$API_LEVEL scripts.
Fix LP64 standalone toolchains targeting 21+.