-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[UEFI] Add driver path to program paths list #162387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
UEFI toolchain driver implementation does not set the path where tools such as lld-link can be found. This patch fixes that.
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Prabhu Rajasekaran (Prabhuk) ChangesUEFI toolchain driver implementation does not set the path where tools Full diff: https://github.com/llvm/llvm-project/pull/162387.diff 3 Files Affected:
diff --git a/clang/lib/Driver/ToolChains/UEFI.cpp b/clang/lib/Driver/ToolChains/UEFI.cpp
index 75adbf149197b..d2be147c7b9f6 100644
--- a/clang/lib/Driver/ToolChains/UEFI.cpp
+++ b/clang/lib/Driver/ToolChains/UEFI.cpp
@@ -24,7 +24,9 @@ using namespace clang;
using namespace llvm::opt;
UEFI::UEFI(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- : ToolChain(D, Triple, Args) {}
+ : ToolChain(D, Triple, Args) {
+ getProgramPaths().push_back(getDriver().Dir);
+}
Tool *UEFI::buildLinker() const { return new tools::uefi::Linker(*this); }
diff --git a/clang/test/Driver/fuse-ld.c b/clang/test/Driver/fuse-ld.c
index f807434dad107..cdcd5126507db 100644
--- a/clang/test/Driver/fuse-ld.c
+++ b/clang/test/Driver/fuse-ld.c
@@ -101,3 +101,8 @@
// RUN: | FileCheck %s --check-prefix CHECK-WINDOWS-MSVC-BFD
// CHECK-WINDOWS-MSVC-BFD: "{{.*}}ld.bfd"
// CHECK-WINDOWS-MSVC-BFD-SAME: "-o"
+
+// RUN: %clang %s -### -fuse-ld=lld \
+// RUN: --target=x86_64-unknown-uefi 2>&1 \
+// RUN: | FileCheck %s --check-prefix CHECK-UEFI-LLD-LINK
+// CHECK-UEFI-LLD-LINK: "{{.*}}lld-link
diff --git a/clang/test/Driver/uefi-constructed-args.c b/clang/test/Driver/uefi-constructed-args.c
index c06cce351d654..642d90642fae0 100644
--- a/clang/test/Driver/uefi-constructed-args.c
+++ b/clang/test/Driver/uefi-constructed-args.c
@@ -12,3 +12,8 @@
// CHECK-SAME: "/entry:EfiMain"
// CHECK-SAME: "/tsaware:no"
// CHECK-SAME: "/debug"
+
+// RUN: %clang -### --target=x86_64-unknown-uefi -print-search-dirs 2>&1
+// RUN: | FileCheck -check-prefixes=PROGPATH %s
+// PROGPATH-DAG: InstalledDir: [[DRIVER_INSTALLED_DIR:.*]]
+// PROGPATH: programs: =[[DRIVER_INSTALLED_DIR]]
|
|
||
// RUN: %clang -### --target=x86_64-unknown-uefi -print-search-dirs 2>&1 \ | ||
// RUN: | FileCheck -check-prefixes=PROGPATH %s | ||
// PROGPATH-DAG: InstalledDir: [[DRIVER_INSTALLED_DIR:.*]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should remove -DAG:
(it's a no-op in this case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Done.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/15767 Here is the relevant piece of the build log for the reference
|
UEFI toolchain driver implementation does not set the path where tools such as lld-link can be found. This patch fixes that.
UEFI toolchain driver implementation does not set the path where tools
such as lld-link can be found. This patch fixes that.