[compiler-rt] [compiler-rt] Allow to build on CYGWIN (PR #66348)

Carlo Bramini via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 02:31:43 PDT 2023


https://github.com/carlo-bramini created https://github.com/llvm/llvm-project/pull/66348:

If you try to build `compiler-rt` on CYGWIN, you will get message:
```
error: Unsupported target
```
Adding support for this platform. just needs to add testing if `__CYGWIN__` is defined into `lib\builtins\int_lib.h`.

>From b09ee61cab8951aa5f988d3e520c91bd89510814 Mon Sep 17 00:00:00 2001
From: Carlo Bramini <30959007+carlo-bramini at users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:28:45 +0200
Subject: [PATCH] [compiler-rt] Allow to build on CYGWIN

If you try to build compiler-rt on CYGWIN, you will get message:
error: Unsupported target
Adding support for this platform just need to add testing if __CYGWIN__ is defined into lib\builtins\int_lib.h.
---
 compiler-rt/lib/builtins/int_lib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/builtins/int_lib.h b/compiler-rt/lib/builtins/int_lib.h
index fb791ebc42eb16d..04ea2d910574bcf 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(_AIX)    || defined(__CYGWIN__)
 #define COMPILER_RT_ALIAS(name, aliasname) \
   COMPILER_RT_ABI __typeof(name) aliasname __attribute__((__alias__(#name)));
 #elif defined(__APPLE__)



More information about the llvm-commits mailing list