[PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

Richard Barton via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 13:55:19 PDT 2016

richard.barton.arm added a comment.

Hi Eric

Sorry for the delay - I originally detected the failure while not running in a totally clean environment with clean sources, but I can reproduce on clean code.

I can reproduce by building with clean clang and libcxx sources:
cmake -DLLVM_PATH=/work/ricbar01/llvm_oss/ -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_CXX_ABI_INCLUDE_PATHS=../../libcxxabi_oss/include -DCMAKE_C_COMPILER=/work/ricbar01/llvm_oss/build/bin/clang -DCMAKE_CXX_COMPILER=/work/ricbar01/llvm_oss/build/bin/clang++ -DLIBCXX_ENABLE_THREADS=OFF -DLIBCXX_ENABLE_SHARED=OFF -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF ..

I get errors like:
/work/ricbar01/libcxx_oss/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp:21:8: error: no type named 'mutex' in namespace 'std'

  std::mutex m;

>From eyeballing the include/mutex it looks like the mutex class is #ifdeffec out when _LIBCPP_HAS_NO_THREADS is unset.


More information about the cfe-commits mailing list