Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NOT strip debug symbols ndk-build

Tags:

android-ndk

Seems like ndk-build strips debug symbols when it copies .so from obj to lib folder. Is there a way to tell ndk-build not to strip the debug symbols?

like image 681
dev Avatar asked Jun 01 '16 17:06

dev


2 Answers

In your Android.mk you could override cmd-strip to do what you want, e.g. nothing:

# Don't strip debug builds
ifeq ($(APP_OPTIM),debug)
    cmd-strip := 
endif
like image 155
Michael Avatar answered Jan 03 '23 16:01

Michael


Adding this to Application.mk solved it for me:

APP_STRIP_MODE := none

So, taking suggestions from @Michael and @gmetal:

ifeq ($(NDK_DEBUG),1)
  APP_STRIP_MODE := none
endif
like image 29
vesperto Avatar answered Jan 03 '23 18:01

vesperto