-
Notifications
You must be signed in to change notification settings - Fork 15
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
Place Swift runtime libraries in a separate directory than the buildtime libraries in the SDK bundle #191
Comments
What do you foresee that helping with? You had no problem separating the stub libraries from the NDK out from the Swift and Termux libraries that are needed at runtime: why would anyone else? I chose to put the Swift runtime libraries in I understand that it's a lot of libraries to deal with and figure out, but I don't think this single split helps much. |
It actually is a bit troublesome – my test runner harness that I'm using for It appears to me that the NDK's clang automatically links against both |
Yeah, I saw that, thought about it, but figured it was better to place these libraries built against API 24 in that directory. I will try moving these runtime libraries on the CI and check how well it works, let's see. |
I actually ran into a similar issue today trying to target a later NDK (by overriding target args), then it couldn't link against the Swift runtime libraries. In the end I had to just dlopen() the newer library. |
It would definitely be used to be able to choose the target level at compile time. |
In the SDK bundle, all the libraries that are required to be included with a program (like
libswiftCore.so
) are included in the same folder as the core NDK libraries that are needed for linking (likelibc.so
). This makes it difficult to choose which libraries that need to be packaged with a Swift program, either as peers for a command-line executable or embedded in an .apk.Specifically, the SDK folder
swift-6.0.2-RELEASE-android-24-0.1.artifactbundle/swift-6.0.2-release-android-24-sdk/android-27c-sysroot/usr/lib/aarch64-linux-android/24
currently contains:Could we split these into two separate folders, like we do with the individual SDK builds? Maybe with the link dependencies (libEGL.so, libGLESv1_CM.so, libGLESv2.so, libGLESv3.so, libOpenMAXAL.so, libOpenSLES.so, libandroid.so, libc++.so, libc.so, libcamera2ndk.so, libdl.so, libjnigraphics.so, liblog.so, libm.so, libmediandk.so, libstdc++.so, libvulkan.so, libz.so) going in
usr/lib/aarch64-linux-android/24/
and the runtime dependencies going inusr/lib/aarch64-linux-android/swift/
? We might need to add an extralibrarySearchPaths
flag toswift-sdk.json
, but it seems like that might be the only change that would be needed.The text was updated successfully, but these errors were encountered: