r307104 - Enable LLVM asan support for NetBSD/amd64

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 6 05:57:54 PDT 2017


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


More information about the cfe-commits mailing list