[PATCH] D45662: Fuzzer, add libcxx for OpenBSD
David CARLIER via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 14 23:23:51 PDT 2018
devnexen created this revision.
devnexen added reviewers: dberris, alexfh, alekseyshl.
Herald added a reviewer: EricWF.
Herald added a subscriber: cfe-commits.
- On platform supported by clang, libcxx is too.
- Adding explicitly to avoid to have to add manually.
Repository:
rC Clang
https://reviews.llvm.org/D45662
Files:
lib/Driver/ToolChains/CommonArgs.cpp
Index: lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- lib/Driver/ToolChains/CommonArgs.cpp
+++ lib/Driver/ToolChains/CommonArgs.cpp
@@ -673,8 +673,11 @@
&& !Args.hasArg(options::OPT_shared)) {
addSanitizerRuntime(TC, Args, CmdArgs, "fuzzer", false, true);
- if (!Args.hasArg(clang::driver::options::OPT_nostdlibxx))
+ if (!Args.hasArg(clang::driver::options::OPT_nostdlibxx)) {
TC.AddCXXStdlibLibArgs(Args, CmdArgs);
+ if (TC.getTriple().getOS() == llvm::Triple::OpenBSD)
+ CmdArgs.push_back(Args.hasArg(options::OPT_pg) ? "-lc++_p" : "-lc++");
+ }
}
for (auto RT : SharedRuntimes)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45662.142541.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180415/3a5e3d54/attachment.bin>
More information about the cfe-commits
mailing list