https://github.com/xgupta updated 
https://github.com/llvm/llvm-project/pull/171077

>From 644fe44635610bcdecda4de084d54bdecc2d6603 Mon Sep 17 00:00:00 2001
From: Brad Smith <[email protected]>
Date: Sun, 7 Dec 2025 23:34:11 -0500
Subject: [PATCH 1/2] [Driver][Hurd] Remove llvm_unreachable

Remove the llvm_unreachable from getDynamicLinker(). The code path is
reachable. In the case of an unsupported architecture we're not worrying
about trying to actually determine the dynamic linker, and I don't think
it makes sense for the Driver to crash.

Pointed out by bug report #64194
---
 clang/lib/Driver/ToolChains/Hurd.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/Hurd.cpp 
b/clang/lib/Driver/ToolChains/Hurd.cpp
index 53ee4d4c0cbde..b2c887fb72671 100644
--- a/clang/lib/Driver/ToolChains/Hurd.cpp
+++ b/clang/lib/Driver/ToolChains/Hurd.cpp
@@ -160,7 +160,7 @@ std::string Hurd::getDynamicLinker(const ArgList &Args) 
const {
     break;
   }
 
-  llvm_unreachable("unsupported architecture");
+  return "";
 }
 
 void Hurd::AddClangSystemIncludeArgs(const ArgList &DriverArgs,

>From a88e3726a733823ce2bf0597b0f7463c96716374 Mon Sep 17 00:00:00 2001
From: Shivam Gupta <[email protected]>
Date: Mon, 3 Aug 2026 12:50:04 +0530
Subject: [PATCH 2/2] Update Managarm

---
 clang/lib/Driver/ToolChains/Managarm.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/Managarm.cpp 
b/clang/lib/Driver/ToolChains/Managarm.cpp
index 4566e7258e929..5c35d27136416 100644
--- a/clang/lib/Driver/ToolChains/Managarm.cpp
+++ b/clang/lib/Driver/ToolChains/Managarm.cpp
@@ -127,8 +127,9 @@ std::string Managarm::getDynamicLinker(const ArgList &Args) 
const {
   case llvm::Triple::x86_64:
     return "/lib/x86_64-managarm/ld.so";
   default:
-    llvm_unreachable("unsupported architecture");
+    break;
   }
+  return "";
 }
 
 void Managarm::AddClangSystemIncludeArgs(const ArgList &DriverArgs,

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to