[PATCH] D128109: [Driver] Pass -X to ld for riscv64-openbsd
Brad Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 17 16:55:41 PDT 2022
brad created this revision.
brad added a reviewer: MaskRay.
brad added a project: clang.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, sameer.abuasal, s.egerton, Jim, benna, psnobl, PkmX, rogfer01, shiva0217, kito-cheng, simoncook, krytarowski, arichardson.
Herald added a project: All.
brad requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD.
Noticing https://reviews.llvm.org/D127826, add support for OpenBSD which uses lld on riscv64.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128109
Files:
clang/lib/Driver/ToolChains/OpenBSD.cpp
Index: clang/lib/Driver/ToolChains/OpenBSD.cpp
===================================================================
--- clang/lib/Driver/ToolChains/OpenBSD.cpp
+++ clang/lib/Driver/ToolChains/OpenBSD.cpp
@@ -156,6 +156,9 @@
if (Args.hasArg(options::OPT_nopie) || Args.hasArg(options::OPT_pg))
CmdArgs.push_back("-nopie");
+ if (ToolChain.getArch() == llvm::Triple::riscv64)
+ CmdArgs.push_back("-X");
+
if (Output.isFilename()) {
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128109.438068.patch
Type: text/x-patch
Size: 522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220617/69fa8a2b/attachment.bin>
More information about the cfe-commits
mailing list