diff --git a/include/llvm/Transforms/Instrumentation.h b/include/llvm/Transforms/Instrumentation.h index a7e6cc58679..9befe588e3b 100644 --- a/include/llvm/Transforms/Instrumentation.h +++ b/include/llvm/Transforms/Instrumentation.h @@ -16,7 +16,7 @@ #include "llvm/ADT/StringRef.h" -#ifdef __GNUC__ +#if defined(__GNUC__) && defined(__linux__) inline void *getDFSanArgTLSPtrForJIT() { extern __thread __attribute__((tls_model("initial-exec"))) void *__dfsan_arg_tls;