From: Eli Lindsey Date: Tue, 4 Apr 2017 19:49:07 +0000 (-0700) Subject: use folly singleton relaxed init on android X-Git-Tag: v2017.04.10.00~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d6cd4a4a1502a57022ecfd83a988b87512613c06;p=folly.git use folly singleton relaxed init on android Summary: fixing D4825412 Reviewed By: lbrandy Differential Revision: D4826815 fbshipit-source-id: 94691ff293dad53b16e7a2f139c1df490a61e565 --- diff --git a/folly/Singleton.cpp b/folly/Singleton.cpp index 4f24328e..7d3eeac6 100644 --- a/folly/Singleton.cpp +++ b/folly/Singleton.cpp @@ -28,7 +28,7 @@ #include -#if !defined(_WIN32) && !defined(__APPLE__) +#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__) static void hs_init_weak(int* argc, char** argv[]) __attribute__((__weakref__("hs_init"))); #endif @@ -36,7 +36,7 @@ static void hs_init_weak(int* argc, char** argv[]) namespace folly { SingletonVault::Type SingletonVault::defaultVaultType() { -#if !defined(_WIN32) && !defined(__APPLE__) +#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__) bool isPython = dlsym(RTLD_DEFAULT, "Py_Main"); bool isHaskel = &::hs_init_weak || dlsym(RTLD_DEFAULT, "hs_init"); bool isJVM = dlsym(RTLD_DEFAULT, "JNI_GetCreatedJavaVMs");