Check if we can export the debug symbols also for Android
Sometimes we would like to be able to debug Geckoview's native code (e.g., if it crashes).
We will need to force the APK to be debuggable (which we can turn on only if needed), but at least we could avoid to rebuild GeckoView.
I think that a command like this could help:
find toolkit/library/build mozglue/build security -name '*.so' -exec bash -c 'mkdir -p $(dirname "/var/tmp/dist/geckoview/libraries/{}"); cp -a {} /var/tmp/dist/geckoview/libraries/{}' \;
I ran it inside the obj-$arch...
directory (notice that at the end we have two obj-...
directories in testbuilds, since we create the fake fat AAR).
These directories come from the fact that they are the ones Mozilla is adding to lldb's configuration.
Notice that I'm doing a full cp
rather than an objcopy
: the difference is 0.1GB in uncompressed files, and I haven't tried if symbols without an explicit gnu link work (maybe we'd have to extract the aar and re-create it to add the debug link, and still I'm not sure it will work).
However, the final size of each artifact will grow from around 50MB to almost 500MB! So, we maybe should we apply it only to testbuilds?