@@ -18,23 +18,20 @@ include(CheckProblematicConfigurations)
18
18
include (HandleLLVMStdlib)
19
19
20
20
if (ANDROID OR CYGWIN OR CMAKE_SYSTEM_NAME MATCHES "AIX|DragonFly|FreeBSD|Haiku|Linux|NetBSD|OpenBSD|SunOS" )
21
- set (HAVE_DLFCN_H 1)
22
21
set (HAVE_MACH_MACH_H 0)
23
22
set (HAVE_MALLOC_MALLOC_H 0)
24
23
set (HAVE_PTHREAD_H 1)
25
24
set (HAVE_SYS_MMAN_H 1)
26
25
set (HAVE_SYSEXITS_H 1)
27
26
set (HAVE_UNISTD_H 1)
28
27
elseif (APPLE )
29
- set (HAVE_DLFCN_H 1)
30
28
set (HAVE_MACH_MACH_H 1)
31
29
set (HAVE_MALLOC_MALLOC_H 1)
32
30
set (HAVE_PTHREAD_H 1)
33
31
set (HAVE_SYS_MMAN_H 1)
34
32
set (HAVE_SYSEXITS_H 1)
35
33
set (HAVE_UNISTD_H 1)
36
34
elseif (PURE_WINDOWS)
37
- set (HAVE_DLFCN_H 0)
38
35
set (HAVE_MACH_MACH_H 0)
39
36
set (HAVE_MALLOC_MALLOC_H 0)
40
37
set (HAVE_PTHREAD_H 0)
@@ -44,7 +41,6 @@ elseif (PURE_WINDOWS)
44
41
elseif (ZOS)
45
42
# Confirmed in
46
43
# https://github.com/llvm/llvm-project/pull/104706#issuecomment-2297109613
47
- set (HAVE_DLFCN_H 1)
48
44
set (HAVE_MACH_MACH_H 0)
49
45
set (HAVE_MALLOC_MALLOC_H 0)
50
46
set (HAVE_PTHREAD_H 1)
@@ -53,7 +49,6 @@ elseif (ZOS)
53
49
set (HAVE_UNISTD_H 1)
54
50
else ()
55
51
# Other platforms that we don't promise support for.
56
- check_include_file(dlfcn.h HAVE_DLFCN_H)
57
52
check_include_file(mach/mach.h HAVE_MACH_MACH_H)
58
53
check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H)
59
54
check_include_file(pthread.h HAVE_PTHREAD_H)
@@ -390,15 +385,11 @@ if (NOT PURE_WINDOWS)
390
385
if (LLVM_PTHREAD_LIB)
391
386
list (REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${LLVM_PTHREAD_LIB} )
392
387
endif ()
393
- endif ()
394
388
395
- # This check requires _GNU_SOURCE.
396
- if ( HAVE_DLFCN_H )
397
389
if ( HAVE_LIBDL )
398
390
list (APPEND CMAKE_REQUIRED_LIBRARIES dl)
399
391
endif ()
400
392
check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
401
- check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
402
393
if ( HAVE_LIBDL )
403
394
list (REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl)
404
395
endif ()
0 commit comments