[PATCH] D128134: [Driver] Pass -X to ld for riscv64-fuchsia
Brad Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 19 00:22:43 PDT 2022
brad created this revision.
brad added reviewers: MaskRay, phosek.
brad added a project: clang.
Herald added subscribers: sunshaoce, VincentWu, luke957, abrachet, StephenFan, vkmr, evandro, sameer.abuasal, s.egerton, Jim, benna, psnobl, PkmX, rogfer01, shiva0217, kito-cheng, simoncook, arichardson.
Herald added a project: All.
brad requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD.
https://reviews.llvm.org/D127826, add support for Fuchsia which uses lld on riscv64.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128134
Files:
clang/lib/Driver/ToolChains/Fuchsia.cpp
clang/test/Driver/fuchsia.c
Index: clang/test/Driver/fuchsia.c
===================================================================
--- clang/test/Driver/fuchsia.c
+++ clang/test/Driver/fuchsia.c
@@ -43,6 +43,7 @@
// CHECK: "--hash-style=gnu"
// CHECK-AARCH64: "--fix-cortex-a53-843419"
// CHECK: "-dynamic-linker" "ld.so.1"
+// CHECK-RISCV64: "-X"
// CHECK: Scrt1.o
// CHECK-NOT: crti.o
// CHECK-NOT: crtbegin.o
Index: clang/lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -114,6 +114,9 @@
CmdArgs.push_back(Args.MakeArgString(Dyld));
}
+ if (ToolChain.getArch() == llvm::Triple::riscv64)
+ CmdArgs.push_back("-X");
+
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128134.438178.patch
Type: text/x-patch
Size: 829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220619/19af1018/attachment.bin>
More information about the cfe-commits
mailing list