[libcxx-commits] [libcxx] [libcxx] Recognize __UEFI__ predefine (PR #139327)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 9 14:34:41 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Prabhu Rajasekaran (Prabhuk)

<details>
<summary>Changes</summary>

The new target triple x86_64-uefi does not set _WIN32 macro. It sets a
new predefine __UEFI__. Update platform to recognize if the target
object format is COFF based on __UEFI__ as well.


---
Full diff: https://github.com/llvm/llvm-project/pull/139327.diff


1 Files Affected:

- (modified) libcxx/include/__configuration/platform.h (+1-1) 


``````````diff
diff --git a/libcxx/include/__configuration/platform.h b/libcxx/include/__configuration/platform.h
index f3c199dee172b..4a414d00e2208 100644
--- a/libcxx/include/__configuration/platform.h
+++ b/libcxx/include/__configuration/platform.h
@@ -20,7 +20,7 @@
 #  define _LIBCPP_OBJECT_FORMAT_ELF 1
 #elif defined(__MACH__)
 #  define _LIBCPP_OBJECT_FORMAT_MACHO 1
-#elif defined(_WIN32)
+#elif defined(_WIN32) || defined(__UEFI__)
 #  define _LIBCPP_OBJECT_FORMAT_COFF 1
 #elif defined(__wasm__)
 #  define _LIBCPP_OBJECT_FORMAT_WASM 1

``````````

</details>


https://github.com/llvm/llvm-project/pull/139327


More information about the libcxx-commits mailing list