Skip to content

Commit 437040f

Browse files
rakucoRaphael Kubo da Costa
andauthored
[CMake] Use shm_open, not clock_gettime, to detect librt (llvm#120727)
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. Co-authored-by: Raphael Kubo da Costa <[email protected]>
1 parent 3890215 commit 437040f

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
@@ -146,7 +146,7 @@ if( NOT PURE_WINDOWS )
146146
endif()
147147
endif()
148148
check_library_exists(dl dlopen "" HAVE_LIBDL)
149-
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
149+
check_library_exists(rt shm_open "" HAVE_LIBRT)
150150
endif()
151151

152152
# Check for libpfm.

0 commit comments

Comments
 (0)