r321060 - Teach clang/NetBSD about additional dependencies for sanitizers
Kamil Rytarowski via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 18 23:10:33 PST 2017
Author: kamil
Date: Mon Dec 18 23:10:33 2017
New Revision: 321060
URL: http://llvm.org/viewvc/llvm-project?rev=321060&view=rev
Log:
Teach clang/NetBSD about additional dependencies for sanitizers
Summary:
Sanitizers on NetBSD require additional linkage:
- libutil for forkpty(3)
- libexecinfo for backtrace(3)
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, eugenis, vitalybuka, kcc
Reviewed By: eugenis
Subscribers: #sanitizers, cfe-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D41054
Modified:
cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=321060&r1=321059&r2=321060&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Mon Dec 18 23:10:33 2017
@@ -549,6 +549,12 @@ void tools::linkSanitizerRuntimeDeps(con
TC.getTriple().getOS() != llvm::Triple::NetBSD &&
TC.getTriple().getOS() != llvm::Triple::RTEMS)
CmdArgs.push_back("-ldl");
+ // Required for forkpty on some OSes
+ if (TC.getTriple().getOS() == llvm::Triple::NetBSD)
+ CmdArgs.push_back("-lutil");
+ // Required for backtrace on some OSes
+ if (TC.getTriple().getOS() == llvm::Triple::NetBSD)
+ CmdArgs.push_back("-lexecinfo");
}
static void
More information about the cfe-commits
mailing list