[PATCH] D156771: [clang][hexagon] Handle library path arguments earlier
Brian Cain via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 7 18:22:16 PDT 2023
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5bc4b34a3aa9: [clang][hexagon] Handle library path arguments earlier (authored by androm3da).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156771/new/
https://reviews.llvm.org/D156771
Files:
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/test/Driver/hexagon-toolchain-linux.c
Index: clang/test/Driver/hexagon-toolchain-linux.c
===================================================================
--- clang/test/Driver/hexagon-toolchain-linux.c
+++ clang/test/Driver/hexagon-toolchain-linux.c
@@ -120,8 +120,12 @@
// CHECK009-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]/include"
// CHECK009-SAME: {{^}} "-internal-externc-isystem" "[[INSTALLED_DIR]]/../target/hexagon/include"
-// RUN: %clang -fdriver-only -Werror -v -L/tmp \
-// RUN: --target=hexagon-unknown-linux-musl %s 2>&1 \
+// RUN: %clang -Werror -L/tmp \
+// RUN: --target=hexagon-unknown-linux-musl %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK010 %s
// CHECK010: InstalledDir: [[INSTALLED_DIR:.+]]
+// CHECK010-NOT: "-lstandalone"
+// CHECK010-NOT: crt0_standalone.o
+// CHECK010: crt1.o
// CHECK010: "-L/tmp"
+// CHECK010-NOT: "-lstandalone"
Index: clang/lib/Driver/ToolChains/Hexagon.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Hexagon.cpp
+++ clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -383,6 +383,11 @@
if (HTC.ShouldLinkCXXStdlib(Args))
HTC.AddCXXStdlibLibArgs(Args, CmdArgs);
}
+ const ToolChain::path_list &LibPaths = HTC.getFilePaths();
+ for (const auto &LibPath : LibPaths)
+ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
+ Args.ClaimAllArgs(options::OPT_L);
+ return;
}
//----------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156771.548014.patch
Type: text/x-patch
Size: 1506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230808/9f09e1f0/attachment.bin>
More information about the cfe-commits
mailing list