Don't link NetBSD programs with -ldl in linkXRayRuntimeDeps

Summary:
There is no such library on NetBSD, the corresponding functions like dlopen(3) are in libc.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka, eugenis

Reviewed By: vitalybuka

Subscribers: dberris, llvm-commits, #sanitizers

Tags: #sanitizers

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

llvm-svn: 320220
This commit is contained in:
Kamil Rytarowski 2017-12-09 00:34:01 +00:00
parent 3d3f91e832
commit 62d421f32b
1 changed files with 2 additions and 1 deletions

View File

@ -244,7 +244,8 @@ static void linkXRayRuntimeDeps(const ToolChain &TC, const ArgList &Args,
CmdArgs.push_back("-lrt");
CmdArgs.push_back("-lm");
if (TC.getTriple().getOS() != llvm::Triple::FreeBSD)
if (TC.getTriple().getOS() != llvm::Triple::FreeBSD &&
TC.getTriple().getOS() != llvm::Triple::NetBSD)
CmdArgs.push_back("-ldl");
}