summaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-12-09 00:34:01 +0000
committerKamil Rytarowski <n54@gmx.com>2017-12-09 00:34:01 +0000
commit26ab9d0e74053d253d2b963976c268771bda967c (patch)
treea3fa99e8bd3e36b67ec2c58df5fc972b50654225 /lib/Driver/ToolChains
parentdef73313d797164f5042301c02a14cde75afb66d (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains')
-rw-r--r--lib/Driver/ToolChains/Gnu.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
index 2d1b9a409a..7845781f12 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/lib/Driver/ToolChains/Gnu.cpp
@@ -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");
}