[compiler-rt] f87109f - [compiler-rt] allow building with uefi (#131499)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 20 14:23:56 PDT 2025
Author: Tristan Ross
Date: 2025-04-20T14:23:53-07:00
New Revision: f87109f018faad5f3f1bf8a4668754c24e84e886
URL: https://github.com/llvm/llvm-project/commit/f87109f018faad5f3f1bf8a4668754c24e84e886
DIFF: https://github.com/llvm/llvm-project/commit/f87109f018faad5f3f1bf8a4668754c24e84e886.diff
LOG: [compiler-rt] allow building with uefi (#131499)
I'm trying to put together an LLVM built toolchain (including LLVM libc)
targeting UEFI, currently I get an error saying "Unknown target". This
PR enables compiling compiler-rt for UEFI.
Added:
Modified:
compiler-rt/lib/builtins/int_lib.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/int_lib.h b/compiler-rt/lib/builtins/int_lib.h
index f6c1b7cff4b99..943430de259d8 100644
--- a/compiler-rt/lib/builtins/int_lib.h
+++ b/compiler-rt/lib/builtins/int_lib.h
@@ -49,7 +49,7 @@
#define SYMBOL_NAME(name) XSTR(__USER_LABEL_PREFIX__) #name
#if defined(__ELF__) || defined(__MINGW32__) || defined(__wasm__) || \
- defined(_AIX) || defined(__CYGWIN__)
+ defined(_AIX) || defined(__CYGWIN__)
#define COMPILER_RT_ALIAS(name, aliasname) \
COMPILER_RT_ABI __typeof(name) aliasname __attribute__((__alias__(#name)));
#elif defined(__APPLE__)
@@ -64,7 +64,7 @@
COMPILER_RT_ALIAS_VISIBILITY(aliasname) \
__asm__(SYMBOL_NAME(aliasname) " = " SYMBOL_NAME(name)); \
COMPILER_RT_ABI __typeof(name) aliasname;
-#elif defined(_WIN32)
+#elif defined(_WIN32) || defined(__UEFI__)
#define COMPILER_RT_ALIAS(name, aliasname)
#else
#error Unsupported target
More information about the llvm-commits
mailing list