am a269d195: am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo
This commit is contained in:
@@ -71,7 +71,6 @@ private:
|
|||||||
|
|
||||||
Extras* mExtras;
|
Extras* mExtras;
|
||||||
void* mReserved0;
|
void* mReserved0;
|
||||||
static String16 sEmptyDescriptor;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -12,34 +12,35 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# we have the common sources, plus some device-specific stuff
|
# we have the common sources, plus some device-specific stuff
|
||||||
LOCAL_SRC_FILES:= \
|
sources := \
|
||||||
Binder.cpp \
|
Binder.cpp \
|
||||||
BpBinder.cpp \
|
BpBinder.cpp \
|
||||||
IInterface.cpp \
|
IInterface.cpp \
|
||||||
IMemory.cpp \
|
IMemory.cpp \
|
||||||
IPCThreadState.cpp \
|
IPCThreadState.cpp \
|
||||||
IPermissionController.cpp \
|
IPermissionController.cpp \
|
||||||
IServiceManager.cpp \
|
IServiceManager.cpp \
|
||||||
MemoryDealer.cpp \
|
MemoryDealer.cpp \
|
||||||
MemoryBase.cpp \
|
MemoryBase.cpp \
|
||||||
MemoryHeapBase.cpp \
|
MemoryHeapBase.cpp \
|
||||||
MemoryHeapPmem.cpp \
|
MemoryHeapPmem.cpp \
|
||||||
Parcel.cpp \
|
Parcel.cpp \
|
||||||
Permission.cpp \
|
Permission.cpp \
|
||||||
ProcessState.cpp \
|
ProcessState.cpp \
|
||||||
Static.cpp
|
Static.cpp
|
||||||
|
|
||||||
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
LOCAL_LDLIBS += -lpthread
|
LOCAL_LDLIBS += -lpthread
|
||||||
|
LOCAL_MODULE := libbinder
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
|
||||||
liblog \
|
LOCAL_SRC_FILES := $(sources)
|
||||||
libcutils \
|
|
||||||
libutils
|
|
||||||
|
|
||||||
LOCAL_MODULE:= libbinder
|
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_LDLIBS += -lpthread
|
||||||
|
LOCAL_MODULE := libbinder
|
||||||
|
LOCAL_SRC_FILES := $(sources)
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ public:
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
String16 BBinder::sEmptyDescriptor;
|
|
||||||
|
|
||||||
BBinder::BBinder()
|
BBinder::BBinder()
|
||||||
: mExtras(NULL)
|
: mExtras(NULL)
|
||||||
{
|
{
|
||||||
@@ -88,6 +86,9 @@ status_t BBinder::pingBinder()
|
|||||||
|
|
||||||
const String16& BBinder::getInterfaceDescriptor() const
|
const String16& BBinder::getInterfaceDescriptor() const
|
||||||
{
|
{
|
||||||
|
// This is a local static rather than a global static,
|
||||||
|
// to avoid static initializer ordering issues.
|
||||||
|
static String16 sEmptyDescriptor;
|
||||||
LOGW("reached BBinder::getInterfaceDescriptor (this=%p)", this);
|
LOGW("reached BBinder::getInterfaceDescriptor (this=%p)", this);
|
||||||
return sEmptyDescriptor;
|
return sEmptyDescriptor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,3 +104,13 @@ endif # sim
|
|||||||
LOCAL_MODULE:= libutils
|
LOCAL_MODULE:= libutils
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
|
ifneq ($(TARGET_SIMULATOR),true)
|
||||||
|
ifeq ($(TARGET_OS),linux)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_C_INCLUDES += external/zlib external/icu4c/common
|
||||||
|
LOCAL_LDLIBS := -lrt -ldl -lpthread
|
||||||
|
LOCAL_MODULE := libutils
|
||||||
|
LOCAL_SRC_FILES := $(commonSources) BackupData.cpp BackupHelpers.cpp
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|||||||
@@ -136,10 +136,11 @@ static inline char* getEmptyString()
|
|||||||
|
|
||||||
void initialize_string8()
|
void initialize_string8()
|
||||||
{
|
{
|
||||||
#ifdef LIBUTILS_NATIVE
|
// HACK: This dummy dependency forces linking libutils Static.cpp,
|
||||||
// Bite me, Darwin!
|
// which is needed to initialize String8/String16 classes.
|
||||||
gDarwinIsReallyAnnoying = gDarwinCantLoadAllObjects;
|
// These variables are named for Darwin, but are needed elsewhere too,
|
||||||
#endif
|
// including static linking on any platform.
|
||||||
|
gDarwinIsReallyAnnoying = gDarwinCantLoadAllObjects;
|
||||||
|
|
||||||
SharedBuffer* buf = SharedBuffer::alloc(1);
|
SharedBuffer* buf = SharedBuffer::alloc(1);
|
||||||
char* str = (char*)buf->data();
|
char* str = (char*)buf->data();
|
||||||
|
|||||||
Reference in New Issue
Block a user