[PATCH] D77498: [Hexagon] Select lld as the default linker for linux-musl target
Sid Manning via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 6 11:26:17 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2c5d6dfda98e: [Hexagon] Make lld be the default linker for linux/musl (authored by sidneym).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77498/new/
https://reviews.llvm.org/D77498
Files:
clang/lib/Driver/ToolChains/Hexagon.h
clang/test/Driver/hexagon-toolchain-elf.c
Index: clang/test/Driver/hexagon-toolchain-elf.c
===================================================================
--- clang/test/Driver/hexagon-toolchain-elf.c
+++ clang/test/Driver/hexagon-toolchain-elf.c
@@ -674,3 +674,15 @@
// RUN: | FileCheck -check-prefix=CHECK090 %s
// CHECK090-NOT: -fno-use-init-array
// -----------------------------------------------------------------------------
+// Check default linker for musl
+// -----------------------------------------------------------------------------
+// RUN: %clang -### -target hexagon-unknown-linux-musl %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK091 %s
+// CHECK091: ld.lld
+// -----------------------------------------------------------------------------
+// Check default linker for elf
+// -----------------------------------------------------------------------------
+// RUN: %clang -### -target hexagon-unknown-elf %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK092 %s
+// CHECK092: hexagon-link
+// -----------------------------------------------------------------------------
Index: clang/lib/Driver/ToolChains/Hexagon.h
===================================================================
--- clang/lib/Driver/ToolChains/Hexagon.h
+++ clang/lib/Driver/ToolChains/Hexagon.h
@@ -81,7 +81,9 @@
const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const override;
- const char *getDefaultLinker() const override { return "hexagon-link"; }
+ const char *getDefaultLinker() const override {
+ return getTriple().isMusl() ? "ld.lld" : "hexagon-link";
+ }
CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77498.255418.patch
Type: text/x-patch
Size: 1692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200406/af956d58/attachment.bin>
More information about the cfe-commits
mailing list