diff options
author | Dan Egnor <egnor@google.com> | 2010-05-06 00:55:09 -0700 |
---|---|---|
committer | Dan Egnor <egnor@google.com> | 2010-05-06 01:03:31 -0700 |
commit | 386a332b4f70718cccb08d5511d66e9f4f5bd409 (patch) | |
tree | e41ac9e7b228ad08eabc52486b10357aaaf0c595 /libs/utils/String8.cpp | |
parent | 110ecf05428ee0bcd4657048b3f15daa0f01747e (diff) | |
download | frameworks_native-386a332b4f70718cccb08d5511d66e9f4f5bd409.zip frameworks_native-386a332b4f70718cccb08d5511d66e9f4f5bd409.tar.gz frameworks_native-386a332b4f70718cccb08d5511d66e9f4f5bd409.tar.bz2 |
Make static versions of libutils and libbinder.
Fix some small static-initialization-order issues (and a static-
initializers-missing issue) that result from doing so. The static
libraries don't actually get used for anything real at the moment --
they're used for perf tests of bug 2660235.
Bug: 2660235
Change-Id: Iee2f38f79cc93b395e8d0a5a144ed92461f5ada0
Diffstat (limited to 'libs/utils/String8.cpp')
-rw-r--r-- | libs/utils/String8.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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(); |