2013-04-19 4 views
5

私はOSX上で打ち鳴らすの--thread-sanitizerオプションを使用しようとしています:OSXでclang thread sanitizerを使用するには?

$ clang++ -fthread-sanitizer -fpic tsan1.cc 
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn) 
Target: x86_64-apple-darwin12.3.0 
Thread model: posix 
[...] 
clang -cc1 version 4.2 based upon LLVM 3.2svn default target x86_64-apple-darwin12.3.0 
[...] 
Undefined symbols for architecture x86_64: 
    "___tsan_func_entry", referenced from: 
     threadfunc(void*) in tsan1-6f7gbr.o 
[...] 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

は、リンケージ・エラーのように見えます。私はいくつかの追加のlibsとリンクする必要がありますか?

+0

macportsにバグを発見しました:http://trac.macports.org/ticket/38528、まだ修正されていない必要があります – grep

答えて

2

ThreadSanitizerはDarwinではC++ではサポートされていません。これは、少なくとも半年で変わることはまずありません。

+0

これのソースは? – jupp0r

関連する問題