LOCAL_WHOLE_STATIC_LIBRARIES 与LOCAL_STATIC_LIBRARIES的区别

From the description below,if we use LOCAL_WHOLE_STATIC_LIBRARIES to 
generate a shared library,all the symbols in static lib will be 
included in the shared library. 

But in my test,the generated shared library is only about 4K which 
don't have all the symbols of static library, and there's unresolved 
symbol when another app link with the shared library. 

Can someone help me? 


LOCAL_WHOLE_STATIC_LIBRARIES 
These are the static libraries that you want to include in your module 
without allowing the linker to remove dead code from them. This is 
mostly useful if you want to add a static library to a shared library 
and have the static library's content exposed from the shared 
library. 

LOCAL_WHOLE_STATIC_LIBRARIES := \ 
    libsqlite3_android 


LOCAL_STATIC_LIBRARIES 
These are the static libraries that you want to include in your 
module. Mostly, we use shared libraries, but there are a couple of 
places, like executables in sbin and host executables where we use 
static libraries instead. 

LOCAL_STATIC_LIBRARIES := \ 
    libutils \ 
    libtinyxml 

原文地址:https://www.cnblogs.com/yifen/p/2798328.html