summaryrefslogtreecommitdiff
path: root/libs/utils/String8.cpp
diff options
context:
space:
mode:
author Dan Egnor <egnor@google.com> 2010-05-06 17:31:48 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-05-06 17:31:48 -0700
commit359b3fd8d8351ac2abc3ec65f355d4fe9d5b9c31 (patch)
tree07786505a6af1a4fc0dbef6e39f4d75484cc79ee /libs/utils/String8.cpp
parente854180f4fce737ad2fdf2e73cc726b20d91a6ce (diff)
parent386a332b4f70718cccb08d5511d66e9f4f5bd409 (diff)
Merge "Make static versions of libutils and libbinder." into froyo
Diffstat (limited to 'libs/utils/String8.cpp')
-rw-r--r--libs/utils/String8.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/utils/String8.cpp b/libs/utils/String8.cpp
index 3a34838711..636cd83428 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();