-
Notifications
You must be signed in to change notification settings - Fork 298
clang __thread caused linker error #8
Copy link
Copy link
Closed
Milestone
Description
ndk r11
APP_STL := c++_static
NDK_TOOLCHAIN_VERSION := clang
Trying to build shared library from single line file:
x.cpp:
__thread const char *x = "";
Got:
/Users/arseny30/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: warning: shared library text segment is not shareable
/Users/arseny30/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: treating warnings as errors
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Everything is OK, when I replace the line with:
__thread const char *x = nullptr;
Reactions are currently unavailable