|
|
@@ -281,31 +281,73 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux) |
|
|
find_library(UNWIND_ARCH NAMES unwind-arm)
|
|
|
endif()
|
|
|
|
|
|
+ if(PAL_CMAKE_PLATFORM_ARCH_ARM64)
|
|
|
+ find_library(UNWIND_ARCH NAMES unwind-aarch64)
|
|
|
+ endif()
|
|
|
+
|
|
|
if(PAL_CMAKE_PLATFORM_ARCH_AMD64)
|
|
|
find_library(UNWIND_ARCH NAMES unwind-x86_64)
|
|
|
endif()
|
|
|
|
|
|
- if(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
|
|
|
+ if(CLR_CMAKE_PLATFORM_ALPINE_LINUX OR CLR_CMAKE_PLATFORM_ANDROID)
|
|
|
find_library(INTL intl)
|
|
|
endif()
|
|
|
|
|
|
- find_library(UNWIND NAMES unwind)
|
|
|
+ # On Android, we don't need to link with gcc_s, pthread and rt
|
|
|
+ if(NOT CLR_CMAKE_PLATFORM_ANDROID)
|
|
|
+ target_link_libraries(coreclrpal
|
|
|
+ gcc_s
|
|
|
+ pthread
|
|
|
+ rt
|
|
|
+ )
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(CLR_CMAKE_PLATFORM_ANDROID)
|
|
|
+ target_link_libraries(coreclrpal
|
|
|
+ gnustl_shared
|
|
|
+ android-support
|
|
|
+ android-glob)
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(NOT CLR_CMAKE_PLATFORM_ANDROID)
|
|
|
+ find_library(UNWIND NAMES unwind)
|
|
|
+
|
|
|
+ if(UNWIND STREQUAL UNWIND-NOTFOUND)
|
|
|
+ message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8-dev and libunwind8.")
|
|
|
+ endif(UNWIND STREQUAL UNWIND-NOTFOUND)
|
|
|
+
|
|
|
+ target_link_libraries(coreclrpal ${UNWIND})
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(CLR_MAKE_PLATFORM_ANDROID)
|
|
|
+ find_library(ANDROID_SUPPORT NAMES android-support)
|
|
|
+ find_library(ANDROID_GLOB NAMES android-glob)
|
|
|
+ find_library(INTL NAMES intl)
|
|
|
+
|
|
|
+ if(UNWIND_ARCH STREQUAL UNWIND_ARCH-NOTFOUND)
|
|
|
+ message(FATAL_ERROR "Cannot find libunwind.")
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(ANDROID_SUPPORT STREQUAL ANDROID_SUPPORT-NOTFOUND)
|
|
|
+ message(FATAL_ERROR "Cannot find android-support.")
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(ANDROID_GLOB STREQUAL ANDROID_GLOB-NOTFOUND)
|
|
|
+ message(FATAL_ERROR "Cannot find android-glob.")
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(INTL STREQUAL INTL-NOTFOUND)
|
|
|
+ message(FATAL_ERROR "Cannot find libintl.")
|
|
|
+ endif()
|
|
|
+ endif()
|
|
|
+
|
|
|
find_library(UNWIND_GENERIC NAMES unwind-generic)
|
|
|
|
|
|
target_link_libraries(coreclrpal
|
|
|
- gcc_s
|
|
|
- pthread
|
|
|
- rt
|
|
|
dl
|
|
|
uuid
|
|
|
)
|
|
|
|
|
|
- if(UNWIND STREQUAL UNWIND-NOTFOUND)
|
|
|
- message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8-dev and libunwind8.")
|
|
|
- endif(UNWIND STREQUAL UNWIND-NOTFOUND)
|
|
|
-
|
|
|
- target_link_libraries(coreclrpal ${UNWIND})
|
|
|
-
|
|
|
if(NOT UNWIND_GENERIC STREQUAL UNWIND_GENERIC-NOTFOUND)
|
|
|
target_link_libraries(coreclrpal ${UNWIND_GENERIC})
|
|
|
endif(NOT UNWIND_GENERIC STREQUAL UNWIND_GENERIC-NOTFOUND)
|
|
|
|
0 comments on commit
55268bf