Force --no-undefined at link time to generate an error when trying to generate a shared library that references undefined symbols.

This can be overriden by defining LOCAL_ALLOW_UNDEFINED_SYMBOLS in your Android.mk to 'true'
This commit is contained in:
David 'Digit' Turner
2009-05-19 14:58:45 +02:00
parent bae86257b5
commit 3caffcfaf8
4 changed files with 22 additions and 0 deletions

View File

@@ -54,6 +54,14 @@ else
endif
endif
#
# If LOCAL_ALLOW_UNDEFINED_SYMBOLS, the linker will allow the generation
# of a binary that uses undefined symbols.
#
ifeq ($(strip $(LOCAL_ALLOW_UNDEFINED_SYMBOLS)),)
LOCAL_LDFLAGS := $(LOCAL_LDFLAGS) $($(my)NO_UNDEFINED_LDFLAGS)
endif
#
# The original Android build system allows you to use the .arm prefix
# to a source file name to indicate that it should be defined in either