Commit b9df5331 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Use libc++ as static library

Too many crashes in the LoadLibrary for unknown reasons
parent 656373e5
......@@ -414,7 +414,7 @@ if [ "${ANDROID_ABI}" = "armeabi-v7a" ];then
NDK_LIB_UNWIND="-lunwind"
fi
EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -L${NDK_LIB_DIR} -lc++abi ${NDK_LIB_UNWIND}"
EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -L${NDK_LIB_DIR} -lc++abi ${NDK_LIB_UNWIND} -lc++_static"
VLC_LDFLAGS="${EXTRA_LDFLAGS}"
# Release or not?
......@@ -713,7 +713,7 @@ if [ $ON_WINDOWS -eq 1 ]; then
fi
$ANDROID_NDK/ndk-build$OSCMD -C libvlc \
APP_STL="c++_shared" \
APP_STL="c++_static" \
LOCAL_CPP_FEATURES="rtti exceptions" \
VLC_SRC_DIR="$VLC_SRC_DIR" \
VLC_BUILD_DIR="$VLC_SRC_DIR/$VLC_BUILD_DIR" \
......@@ -887,10 +887,10 @@ MEDIALIBRARY_LDLIBS="-L$SRC_DIR/libvlc/jni/libs/$ANDROID_ABI -lvlc \
-L${MEDIALIBRARY_BUILD_DIR}/build-android-$ANDROID_ABI/.libs -lmedialibrary \
-L$SRC_DIR/vlc/contrib/contrib-android-$TARGET_TUPLE/jpeg/.libs -ljpeg \
-L$MEDIALIBRARY_MODULE_DIR/$SQLITE_RELEASE/build-$ANDROID_ABI/.libs -lsqlite3 \
-L${NDK_LIB_DIR} -lc++abi ${NDK_LIB_UNWIND}"
-L${NDK_LIB_DIR} -lc++abi ${NDK_LIB_UNWIND} -lc++_static"
$ANDROID_NDK/ndk-build -C medialibrary \
APP_STL="c++_shared" \
APP_STL="c++_static" \
ANDROID_SYS_HEADERS="$ANDROID_SYS_HEADERS" \
APP_BUILD_SCRIPT=jni/Android.mk \
APP_PLATFORM=android-${ANDROID_API} \
......
......@@ -151,7 +151,6 @@ public class LibVLC extends VLCObject<LibVLC.Event> {
return;
sLoaded = true;
System.loadLibrary("c++_shared");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD_MR1
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
try {
......
......@@ -69,7 +69,6 @@ public class Medialibrary {
static {
LibVLC.loadLibraries();
System.loadLibrary("c++_shared");
System.loadLibrary("mla");
}
......
......@@ -2,13 +2,6 @@ apply plugin: 'com.android.application'
android {
packagingOptions {
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/armeabi/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/mips/libc++_shared.so'
pickFirst 'lib/mips64/libc++_shared.so'
}
dexOptions {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment