Commit 189e3b6e authored by Thomas Guillem's avatar Thomas Guillem

build: keep debug info in a seperate .so.dbg file for release

*.so.dbg files are saved in .dbg/<apk_version> directory
parent 5c549403
......@@ -7,6 +7,8 @@
# tmp dir used by gdb.sh
.gdb
# debug symbols
.dbg
# Local configuration
local.properties
......
......@@ -633,3 +633,21 @@ $ANDROID_NDK/ndk-build -C libvlc \
HAVE_64=${HAVE_64} \
NDK_PROJECT_PATH=jni \
NDK_DEBUG=${NDK_DEBUG}
checkfail "ndk-build failed"
if [ "$RELEASE" = 1 ]; then
DBG_LIB_DIR=libvlc/jni/obj/local/${ANDROID_ABI}
OUT_LIB_DIR=libvlc/jni/libs/${ANDROID_ABI}
VERSION=$(grep "android:versionName" vlc-android/AndroidManifest.xml|cut -d\" -f 2)
OUT_DBG_DIR=.dbg/${ANDROID_ABI}/$VERSION
mkdir -p $OUT_DBG_DIR
for lib in ${DBG_LIB_DIR}/*.so; do
${CROSS_COMPILE}objcopy --only-keep-debug "$lib" "$OUT_DBG_DIR/`basename $lib.dbg`"; \
done
for lib in ${OUT_LIB_DIR}/*.so; do
${CROSS_COMPILE}objcopy --add-gnu-debuglink="$OUT_DBG_DIR/`basename $lib.dbg`" "$lib" ; \
done
fi
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