r320220 - Don't link NetBSD programs with -ldl in linkXRayRuntimeDeps
Kamil Rytarowski via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 16:34:01 PST 2017
Author: kamil
Date: Fri Dec 8 16:34:01 2017
New Revision: 320220
URL: http://llvm.org/viewvc/llvm-project?rev=320220&view=rev
Log:
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
Modified:
cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Gnu.cpp?rev=320220&r1=320219&r2=320220&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Fri Dec 8 16:34:01 2017
@@ -244,7 +244,8 @@ static void linkXRayRuntimeDeps(const To
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");
}
More information about the cfe-commits
mailing list