diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b29b77a37dcc5d6a396a57faa711b8b26d2b2e8..4d24079e46d23fe174e8eddf85976987f6e3b75a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1492,3 +1492,10 @@ endif() if(MGE_WITH_LITE) add_subdirectory(lite) endif() + +if(ANDROID) + message( + WARNING + "MegEngine project use thread_local, if you want to deploy MegEngine at dlopen/dlclose scene, please build with c++_shared by -DANDROID_STL=c++_shared, detail at https://github.com/android-ndk/ndk/issues/789 for example: EXTRA_CMAKE_ARGS=\" -DANDROID_STL=c++_shared\" ./scripts/cmake-build/cross_build_android_arm_inference.sh " + ) +endif() diff --git a/lite/load_and_run/BUILD b/lite/load_and_run/BUILD index 58c283441dbe6761b4233af879abd0450ce1307a..03795af0e41cfc2df0dd4ce1b0cda7931e2116ae 100644 --- a/lite/load_and_run/BUILD +++ b/lite/load_and_run/BUILD @@ -30,6 +30,7 @@ cc_megvii_binary( ]), internal_deps = [":lar_object"], visibility = ["//visibility:public"], + # is_linking_system_dynamic_library = True, )