diff --git a/source/loader/CMakeLists.txt b/source/loader/CMakeLists.txt index a10e99f422..931c9dd3ed 100644 --- a/source/loader/CMakeLists.txt +++ b/source/loader/CMakeLists.txt @@ -208,7 +208,8 @@ if(UR_ENABLE_SANITIZER) if(NOT EXISTS ${LIBCXX_PATH} OR NOT EXISTS ${LIBCXX_ABI_PATH}) message(FATAL_ERROR "libc++ is required but can't find the libraries") endif() - target_link_libraries(ur_loader PRIVATE ${LIBCXX_PATH} ${LIBCXX_ABI_PATH}) + # Link with gcc_s fisrt to avoid some symbols resolve to libc++/libc++abi/libunwind's one + target_link_libraries(ur_loader PRIVATE gcc_s ${LIBCXX_PATH} ${LIBCXX_ABI_PATH}) endif() endif()