[llvm] [cmake] Hardcode some `check_include_file` checks (PR #104706)

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 07:32:56 PST 2025


================
@@ -17,6 +17,124 @@ include(CheckCompilerVersion)
 include(CheckProblematicConfigurations)
 include(HandleLLVMStdlib)
 
+if (ANDROID OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Haiku|Linux|NetBSD|OpenBSD|SunOS")
+  set(HAVE_DLFCN_H 1)
+  set(HAVE_ERRNO_H 1)
+  set(HAVE_FCNTL_H 1)
+  set(HAVE_FENV_H 1)
+  set(HAVE_MACH_MACH_H 0)
+  set(HAVE_MALLOC_MALLOC_H 0)
+  set(HAVE_PTHREAD_H 1)
+  set(HAVE_SIGNAL_H 1)
+  set(HAVE_SYS_IOCTL_H 1)
+  set(HAVE_SYS_MMAN_H 1)
+  set(HAVE_SYS_PARAM_H 1)
+  set(HAVE_SYS_RESOURCE_H 1)
+  set(HAVE_SYS_STAT_H 1)
+  set(HAVE_SYS_TIME_H 1)
+  set(HAVE_SYS_TYPES_H 1)
+  set(HAVE_SYSEXITS_H 1)
+  set(HAVE_TERMIOS_H 1)
+  set(HAVE_UNISTD_H 1)
+elseif (CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CYGWIN)
----------------
AaronBallman wrote:

I think we can combine these two sections now that they expose the same headers, and it helps make it more clear that there's no special relationship between AIX and Cygwin.

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


More information about the llvm-commits mailing list