https://github.com/Prabhuk created 
https://github.com/llvm/llvm-project/pull/124824

None

>From 270c260ba8160c71c6602fcb91a635368ee09a88 Mon Sep 17 00:00:00 2001
From: Prabhu Karthikeyan Rajasekaran <prabh...@google.com>
Date: Tue, 28 Jan 2025 19:07:06 +0000
Subject: [PATCH] [clang] Abort on unsupported uefi triples.

The only architecture currently being supported (still a WIP) is
x86_64. Other UEFI triples targeting other architectures will now
report an error.
---
 clang/lib/Driver/Driver.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 87855fdb799710..f1cd6353234a90 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -6677,6 +6677,8 @@ const ToolChain &Driver::getToolChain(const ArgList &Args,
       TC = std::make_unique<toolchains::AMDGPUToolChain>(*this, Target, Args);
       break;
     case llvm::Triple::UEFI:
+      if(Target.getArch() != llvm::Triple::x86_64)        
+        llvm::report_fatal_error("Currently the only architecture supported by 
*-uefi triples are x86_64.");
       TC = std::make_unique<toolchains::UEFI>(*this, Target, Args);
       break;
     case llvm::Triple::Win32:

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to