Skip to content

Commit 199a2f2

Browse files
committed
[CMake] Use shm_open, not clock_gettime, to detect librt
On systems with glibc, clock_gettime() was moved from librt to libc in version 2.17, in which case the current librt detection attempt would always fail. Look for shm_open instead, like other parts of the tree also do when looking for librt.
1 parent d7ddc97 commit 199a2f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/cmake/config-ix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ if( NOT PURE_WINDOWS )
124124
endif()
125125
endif()
126126
check_library_exists(dl dlopen "" HAVE_LIBDL)
127-
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
127+
check_library_exists(rt shm_open "" HAVE_LIBRT)
128128
endif()
129129

130130
# Check for libpfm.

0 commit comments

Comments
 (0)