Release static library size issue with ndk

56 views
Skip to first unread message

凌辰

unread,
Jul 22, 2016, 12:30:14 AM7/22/16
to android-ndk
I encounter an issue that when I compile the my static library source with ndk-build V=1, whether I use  NDK_DEBUG=1 or 0, the g++ alway add -g flag . Because in every toolchain setup.mk , the TARGET_xxx_release_CFLAGS  assignment has -g flag. So my static library size become very large. For example with -g mine is 7.9MB, without is only 957KB. And I use objdump to check the .o file, It has more debug info.  And I found there is no way to del -g flag from Android.mk an Application.mk. How to delete the -g flag without modifying the setup.mk

Dan Albert

unread,
Jul 22, 2016, 1:43:46 PM7/22/16
to android-ndk
For anyone finding this thread, this ended up being discussed on our bug tracker: https://github.com/android-ndk/ndk/issues/169

On Thu, Jul 21, 2016 at 6:13 PM, 凌辰 <lcwyyl...@gmail.com> wrote:
I encounter an issue that when I compile the my static library source with ndk-build V=1, whether I use  NDK_DEBUG=1 or 0, the g++ alway add -g flag . Because in every toolchain setup.mk , the TARGET_xxx_release_CFLAGS  assignment has -g flag. So my static library size become very large. For example with -g mine is 7.9MB, without is only 957KB. And I use objdump to check the .o file, It has more debug info.  And I found there is no way to del -g flag from Android.mk an Application.mk. How to delete the -g flag without modifying the setup.mk

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/21378c4a-929b-449d-b0c3-fd06fb445c34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages