Use --as-needed --no-add-needed for Android

This commit is contained in:
Tor Lillqvist
2012-04-19 14:46:56 +03:00
parent 409f117e1c
commit d83e45ae9c
2 changed files with 7 additions and 2 deletions

View File

@@ -51,6 +51,8 @@ gb_CppunitTest_CPPTESTPRECOMMAND := :
gb_LinkTarget_LDFLAGS += \
-Wl,-z,defs \
-Wl,--as-needed \
-Wl,--no-add-needed
define gb_LinkTarget__command_dynamiclink
$(call gb_Helper_abbreviate_dirs,\

View File

@@ -47,8 +47,11 @@ CDEFS !:= $(subst,-D_REENTRANT, $(CDEFS))
# Thus for Android we never build executable programs, just shared
# libraries that the NativeActivity Java code will load.
LINKFLAGSAPPGUI=-shared
LINKFLAGSAPPCUI=-shared
LINKFLAGSAPPGUI=-shared -Wl,--as-needed -Wl,--no-add-needed
LINKFLAGSAPPCUI=-shared -Wl,--as-needed -Wl,--no-add-needed
LINKFLAGSSHLGUI+= -Wl,--as-needed -Wl,--no-add-needed
LINKFLAGSSHLCUI+= -Wl,--as-needed -Wl,--no-add-needed
STDLIBGUIMT+=-llog -landroid -lgnustl_shared
STDLIBCUIMT+=-llog -landroid -lgnustl_shared