@@ -18,23 +18,20 @@ include(CheckProblematicConfigurations)
1818include (HandleLLVMStdlib)
1919
2020if (ANDROID OR CYGWIN OR CMAKE_SYSTEM_NAME MATCHES "AIX|DragonFly|FreeBSD|Haiku|Linux|NetBSD|OpenBSD|SunOS" )
21- set (HAVE_DLFCN_H 1)
2221 set (HAVE_MACH_MACH_H 0)
2322 set (HAVE_MALLOC_MALLOC_H 0)
2423 set (HAVE_PTHREAD_H 1)
2524 set (HAVE_SYS_MMAN_H 1)
2625 set (HAVE_SYSEXITS_H 1)
2726 set (HAVE_UNISTD_H 1)
2827elseif (APPLE )
29- set (HAVE_DLFCN_H 1)
3028 set (HAVE_MACH_MACH_H 1)
3129 set (HAVE_MALLOC_MALLOC_H 1)
3230 set (HAVE_PTHREAD_H 1)
3331 set (HAVE_SYS_MMAN_H 1)
3432 set (HAVE_SYSEXITS_H 1)
3533 set (HAVE_UNISTD_H 1)
3634elseif (PURE_WINDOWS)
37- set (HAVE_DLFCN_H 0)
3835 set (HAVE_MACH_MACH_H 0)
3936 set (HAVE_MALLOC_MALLOC_H 0)
4037 set (HAVE_PTHREAD_H 0)
@@ -44,7 +41,6 @@ elseif (PURE_WINDOWS)
4441elseif (ZOS)
4542 # Confirmed in
4643 # https://github.com/llvm/llvm-project/pull/104706#issuecomment-2297109613
47- set (HAVE_DLFCN_H 1)
4844 set (HAVE_MACH_MACH_H 0)
4945 set (HAVE_MALLOC_MALLOC_H 0)
5046 set (HAVE_PTHREAD_H 1)
@@ -53,7 +49,6 @@ elseif (ZOS)
5349 set (HAVE_UNISTD_H 1)
5450else ()
5551 # Other platforms that we don't promise support for.
56- check_include_file(dlfcn.h HAVE_DLFCN_H)
5752 check_include_file(mach/mach.h HAVE_MACH_MACH_H)
5853 check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H)
5954 check_include_file(pthread.h HAVE_PTHREAD_H)
@@ -390,15 +385,11 @@ if (NOT PURE_WINDOWS)
390385 if (LLVM_PTHREAD_LIB)
391386 list (REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${LLVM_PTHREAD_LIB} )
392387 endif ()
393- endif ()
394388
395- # This check requires _GNU_SOURCE.
396- if ( HAVE_DLFCN_H )
397389 if ( HAVE_LIBDL )
398390 list (APPEND CMAKE_REQUIRED_LIBRARIES dl)
399391 endif ()
400392 check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
401- check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
402393 if ( HAVE_LIBDL )
403394 list (REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl)
404395 endif ()
0 commit comments