Skip to content

Commit f87109f

Browse files
[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.
1 parent 3ac1aa4 commit f87109f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/builtins/int_lib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#define SYMBOL_NAME(name) XSTR(__USER_LABEL_PREFIX__) #name
5050

5151
#if defined(__ELF__) || defined(__MINGW32__) || defined(__wasm__) || \
52-
defined(_AIX) || defined(__CYGWIN__)
52+
defined(_AIX) || defined(__CYGWIN__)
5353
#define COMPILER_RT_ALIAS(name, aliasname) \
5454
COMPILER_RT_ABI __typeof(name) aliasname __attribute__((__alias__(#name)));
5555
#elif defined(__APPLE__)
@@ -64,7 +64,7 @@
6464
COMPILER_RT_ALIAS_VISIBILITY(aliasname) \
6565
__asm__(SYMBOL_NAME(aliasname) " = " SYMBOL_NAME(name)); \
6666
COMPILER_RT_ABI __typeof(name) aliasname;
67-
#elif defined(_WIN32)
67+
#elif defined(_WIN32) || defined(__UEFI__)
6868
#define COMPILER_RT_ALIAS(name, aliasname)
6969
#else
7070
#error Unsupported target

0 commit comments

Comments
 (0)