[Driver] [NetBSD] Add -D_REENTRANT when using sanitizers
authorMichal Gorny <mgorny@gentoo.org>
Wed, 19 Dec 2018 17:25:59 +0000 (17:25 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Wed, 19 Dec 2018 17:25:59 +0000 (17:25 +0000)
commitf647a9f7dd4d0d0b440ffcf1804d82d238a69bb5
tree9a54efd18cbedee767b58f2b2a2933ec9fa943c4
parent1d43b3210b29cdb1ec46162eb9e7c7ba86865332
[Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

NetBSD intends to support only reentrant interfaces in interceptors.
When -lpthread is used without _REENTRANT defined, things are
not guaranteed to work.

This is especially important for <stdio.h> and sanitization of
interfaces around FILE.  Some APIs have alternative modes depending
on the _REENTRANT definition, and NetBSD intends to support sanitization
of the _REENTRANT ones.

Differential Revision: https://reviews.llvm.org/D55654

llvm-svn: 349650
clang/lib/Driver/ToolChains/NetBSD.cpp
clang/lib/Driver/ToolChains/NetBSD.h