WIP start adding support for TSAN

This commit is contained in:
Andrew Kelley
2020-12-21 22:18:19 -07:00
parent 0fd68f49e2
commit 42b4a48bc9
220 changed files with 72299 additions and 3 deletions

View File

@@ -472,6 +472,10 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) {
ZigLLVMFunctionSetCallingConv(llvm_fn, get_llvm_cc(g, cc));
}
if (g->tsan_enabled) {
addLLVMFnAttr(llvm_fn, "sanitize_thread");
}
bool want_cold = fn->is_cold;
if (want_cold) {
ZigLLVMAddFunctionAttrCold(llvm_fn);