[Android] build: restore c++_shared usage

Thomas Guillem git at videolan.org
Wed Oct 24 11:00:53 CEST 2018


vlc-android | branch: 4.0 | Thomas Guillem <thomas at gllm.fr> | Tue Oct 23 17:35:27 2018 +0200| [b69c0825882b1e550a0c92776ab39a5087aca5be] | committer: Thomas Guillem

build: restore c++_shared usage

This is a partial revert of the following commits
 - b775dbba3acdfd78adb5fb0a45bd607df7ea0f3e "build: fix ODR violation"
 - b9df53313bae2fffb9622d725060bd3f6fc5d68a "Use libc++ as static library"

UnsatisfiedLinkError with c++_shared should be fixed since we now use the last
NDK version and we dropped old android versions that triggered this crash.

This commit remove the ugly jniloader hack.

Here are the list of .so that are now shipped within the APK:
 - c++_shared.so (from the NDK)
 - libvlc.so (all VLC modules, VLC/LibVLC symbols) => link with c++_shared.so
 - libvlcjni.so (all JNI symbols) => link with libvlc.so
 - libmla.so (medialibrary, optional)  => link with libvlc.so and c++_shared.so

The APK size won't change with this commit (the difference of .so sizes is
negligible).

> https://code.videolan.org/videolan/vlc-android/commit/b69c0825882b1e550a0c92776ab39a5087aca5be
---

 .gitignore                                         |  3 +
 compile-libvlc.sh                                  | 67 ++++++++-------
 gdb.sh                                             |  2 +
 libvlc/build.gradle                                |  2 +-
 libvlc/jni/Android.mk                              | 33 +++-----
 libvlc/jni/dummy.cpp                               |  1 +
 libvlc/jni/libvlcjni.c                             | 21 ++++-
 libvlc/jni/loader/Android.mk                       |  6 --
 libvlc/jni/loader/jniloader.c                      | 99 ----------------------
 libvlc/jni/loader/jniloader.h                      | 36 --------
 libvlc/src/org/videolan/libvlc/LibVLC.java         |  3 +-
 medialibrary/jni/Android.mk                        |  8 +-
 medialibrary/jni/AndroidMediaLibrary.cpp           |  1 -
 medialibrary/jni/medialibrary.cpp                  | 21 +++--
 medialibrary/jni/utils.h                           |  2 +
 .../org/videolan/medialibrary/Medialibrary.java    |  9 ++
 vlc-android/build.gradle                           |  5 ++
 17 files changed, 103 insertions(+), 216 deletions(-)

Diff:   https://code.videolan.org/videolan/vlc-android/commit/b69c0825882b1e550a0c92776ab39a5087aca5be


More information about the Android mailing list