[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint
David CARLIER via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 17 11:58:45 PDT 2018
devnexen updated this revision to Diff 142811.
devnexen retitled this revision from "Fuzzer, add libcxx for OpenBSD" to "OpenBSD add C++ runtime in a driver's standpoint".
devnexen edited the summary of this revision.
https://reviews.llvm.org/D45662
Files:
lib/Driver/ToolChains/OpenBSD.cpp
lib/Driver/ToolChains/OpenBSD.h
Index: lib/Driver/ToolChains/OpenBSD.h
===================================================================
--- lib/Driver/ToolChains/OpenBSD.h
+++ lib/Driver/ToolChains/OpenBSD.h
@@ -58,6 +58,8 @@
bool IsMathErrnoDefault() const override { return false; }
bool IsObjCNonFragileABIDefault() const override { return true; }
bool isPIEDefault() const override { return true; }
+ void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
+ llvm::opt::ArgStringList &CmdArgs) const override;
unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
return 2;
Index: lib/Driver/ToolChains/OpenBSD.cpp
===================================================================
--- lib/Driver/ToolChains/OpenBSD.cpp
+++ lib/Driver/ToolChains/OpenBSD.cpp
@@ -259,6 +259,14 @@
getFilePaths().push_back("/usr/lib");
}
+void OpenBSD::AddCXXStdlibLibArgs(const ArgList &Args,
+ ArgStringList &CmdArgs) const {
+ bool Profiling = Args.hasArg(options::OPT_pg);
+
+ CmdArgs.push_back(Profiling ? "-lc++_p" : "-lc++");
+ CmdArgs.push_back(Profiling ? "-lc++abi_p" : "-lc++abi");
+}
+
Tool *OpenBSD::buildAssembler() const {
return new tools::openbsd::Assembler(*this);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45662.142811.patch
Type: text/x-patch
Size: 1257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180417/668738aa/attachment.bin>
More information about the cfe-commits
mailing list