Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions compiler-rt/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ check_cxx_compiler_flag("-Werror -msse4.2" COMPILER_RT_HAS_MSSE4_2_FLAG)
check_cxx_compiler_flag(--sysroot=. COMPILER_RT_HAS_SYSROOT_FLAG)
check_cxx_compiler_flag("-Werror -mcrc" COMPILER_RT_HAS_MCRC_FLAG)
check_cxx_compiler_flag(-fno-partial-inlining COMPILER_RT_HAS_FNO_PARTIAL_INLINING_FLAG)
set(OLD_CMAKE_REQUIRED_LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS})
set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
if (NOT APPLE)
find_library(LIBOPENCILK opencilk
Expand All @@ -89,9 +90,12 @@ else()
endif()
if (IS_ABSOLUTE ${LIBOPENCILK})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBOPENCILK})
else()
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS -fopencilk)
endif()
check_cxx_compiler_flag(-fopencilk COMPILER_RT_HAS_CILK_FLAG)
set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_LINK_OPTIONS ${OLD_CMAKE_REQUIRED_LINK_OPTIONS})

if(NOT WIN32 AND NOT CYGWIN)
# MinGW warns if -fvisibility-inlines-hidden is used.
Expand Down
2 changes: 2 additions & 0 deletions compiler-rt/lib/cilksan/drivercsan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,12 @@ static void initialize_memory_functions() {
if (error != NULL)
goto error_exit;

#if __linux__
real_mremap = (mremap_t)dlsym(RTLD_NEXT, "mremap");
error = dlerror();
if (error != NULL)
goto error_exit;
#endif // __linux__

mem_initialized = 1;
enable_checking();
Expand Down