Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions src/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1030,8 +1030,6 @@ if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
list(INSERT CMAKE_REQUIRED_INCLUDES 0 ${CMAKE_CURRENT_SOURCE_DIR}/libunwind/include ${CMAKE_CURRENT_BINARY_DIR}/libunwind/include)
endif()

set(CMAKE_REQUIRED_FLAGS "-c -Werror=implicit-function-declaration")

check_c_source_compiles("
#include <libunwind.h>
#include <ucontext.h>
Expand All @@ -1043,29 +1041,9 @@ int main(int argc, char **argv)
return 0;
}" UNWIND_CONTEXT_IS_UCONTEXT_T)

check_c_source_compiles("
#include <libunwind.h>

int main(int argc, char **argv) {
unw_cursor_t cursor;
unw_save_loc_t saveLoc;
int reg = UNW_REG_IP;
unw_get_save_loc(&cursor, reg, &saveLoc);

return 0;
}" HAVE_UNW_GET_SAVE_LOC)

check_c_source_compiles("
#include <libunwind.h>

int main(int argc, char **argv) {
unw_addr_space_t as;
unw_get_accessors(as);

return 0;
}" HAVE_UNW_GET_ACCESSORS)
check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC)
check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS)

set(CMAKE_REQUIRED_FLAGS)
if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0 1)
endif()
Expand Down