gre*_*rep 5 macos clang thread-sanitizer
我试图--thread-sanitizer在OSX上使用clang的选项:
$ 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)
Run Code Online (Sandbox Code Playgroud)
看起来像一个链接错误.我应该链接一些额外的库吗?
小智 2
Darwin 上的 C++ 尚不支持 ThreadSanitizer。这种情况至少半年内不太可能改变。
| 归档时间: |
|
| 查看次数: |
1009 次 |
| 最近记录: |