[clang] [clang] Abort on unsupported uefi triples. (PR #124824)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 11:21:42 PST 2025
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 <prabhukr at 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:
More information about the cfe-commits
mailing list