/tmp/main-62d36d.o: In function `A::A()':
main.cpp:(.text._ZN1AC2Ev[_ZN1AC2Ev]+0xd): undefined reference to `TLS wrapper function for A::tm'
zapcc: error: linker command failed with exit code 1 (use -v to see invocation)
Test compiles fine with GCC 8.1.1, Clang 6.0 and Clang 7.0 (svn_r338211).
Stumbled upon this issue trying to compile some code which uses fbthrift. I managed to reproduce the issue with the following simple test case.
a_lib.h:
a_lib.cpp:
main.cpp:
build_zapcc.sh:
Output:
Test compiles fine with GCC 8.1.1, Clang 6.0 and Clang 7.0 (svn_r338211).
thread_local_test.zip