r307104 - Enable LLVM asan support for NetBSD/amd64

Kamil Rytarowski via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 6 07:34:14 PDT 2017


On 06.07.2017 14:57, Joerg Sonnenberger wrote:
> On Tue, Jul 04, 2017 at 07:55:56PM -0000, Kamil Rytarowski via cfe-commits wrote:
>> Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=307104&r1=307103&r2=307104&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp (original)
>> +++ cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Tue Jul  4 12:55:56 2017
>> @@ -524,6 +524,7 @@ void tools::linkSanitizerRuntimeDeps(con
>>    CmdArgs.push_back("-lm");
>>    // There's no libdl on FreeBSD or RTEMS.
>>    if (TC.getTriple().getOS() != llvm::Triple::FreeBSD &&
>> +      TC.getTriple().getOS() != llvm::Triple::NetBSD &&
>>        TC.getTriple().getOS() != llvm::Triple::RTEMS)
>>      CmdArgs.push_back("-ldl");
>>  }
> 
> I'd really prefer if we switched to a positive list here, i.e. only link
> libdl on platforms that actually need it. I'm not sure who does, beside
> Linux.
> 
> Joerg
> 

I have no preference.

SunOS (at least SmartOS) ships with ldl. Most GNU systems (HURD, Linux,
KFREEBSD/GNU) use it too. I think the same applies for HPUX, AIX, IRIX
and Darwin?

There are more switches for the same purpose in the code, but for other
kind of instrumentation. At the moment NetBSD isn't used there.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170706/51d6ddab/attachment.sig>


More information about the cfe-commits mailing list