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());
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());
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits