diff options
author | Dan Egnor <egnor@google.com> | 2010-05-06 17:35:06 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-05-06 17:35:06 -0700 |
commit | a269d195d41ced934d2153fd81fa69ffe7854740 (patch) | |
tree | cbfe9a5b063aa4aa860f4c2e3e26f1acde99780b /libs/utils | |
parent | 94886d9774d11b8bc93e56103d2f0ab61458ada0 (diff) | |
parent | ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f (diff) | |
download | frameworks_base-a269d195d41ced934d2153fd81fa69ffe7854740.zip frameworks_base-a269d195d41ced934d2153fd81fa69ffe7854740.tar.gz frameworks_base-a269d195d41ced934d2153fd81fa69ffe7854740.tar.bz2 |
am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo
Merge commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f' into kraken
* commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f':
Make static versions of libutils and libbinder.
Diffstat (limited to 'libs/utils')
-rw-r--r-- | libs/utils/Android.mk | 10 | ||||
-rw-r--r-- | libs/utils/String8.cpp | 9 |
2 files changed, 15 insertions, 4 deletions
diff --git a/libs/utils/Android.mk b/libs/utils/Android.mk index d0eedb4..afecdcb 100644 --- a/libs/utils/Android.mk +++ b/libs/utils/Android.mk @@ -104,3 +104,13 @@ endif # sim LOCAL_MODULE:= libutils 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 diff --git a/libs/utils/String8.cpp b/libs/utils/String8.cpp index 3a34838..636cd83 100644 --- a/libs/utils/String8.cpp +++ b/libs/utils/String8.cpp @@ -136,10 +136,11 @@ static inline char* getEmptyString() void initialize_string8() { -#ifdef LIBUTILS_NATIVE - // Bite me, Darwin! - gDarwinIsReallyAnnoying = gDarwinCantLoadAllObjects; -#endif + // HACK: This dummy dependency forces linking libutils Static.cpp, + // which is needed to initialize String8/String16 classes. + // These variables are named for Darwin, but are needed elsewhere too, + // including static linking on any platform. + gDarwinIsReallyAnnoying = gDarwinCantLoadAllObjects; SharedBuffer* buf = SharedBuffer::alloc(1); char* str = (char*)buf->data(); |