Skip to content

Commit 8ffad06

Browse files
finagolfinrokhinip
authored andcommitted
[android] Put in fixes for librt and armv7-a
Android doesn't have a separate librt, it's just part of libc. Also, the static build wasn't working for armv7-a, because the test executables wouldn't link with the multiple definition errors listed in android/ndk#176, so use the workaround given there. Signed-off-by: Rokhini Prabhu <[email protected]>
1 parent 0e37faf commit 8ffad06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ if(__BUILTIN_TRAP)
113113
set(HAVE_NORETURN_BUILTIN_TRAP 1)
114114
endif()
115115

116-
find_package(LibRT)
116+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Android)
117+
find_package(LibRT)
118+
endif()
117119

118120
check_function_exists(_pthread_workqueue_init HAVE__PTHREAD_WORKQUEUE_INIT)
119121
check_function_exists(getprogname HAVE_GETPROGNAME)

0 commit comments

Comments
 (0)