Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad configure tests #42756

Merged
merged 1 commit into from
Sep 29, 2020
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/coreclr/src/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,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 @@ -1062,29 +1060,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