Skip to content

Commit

Permalink
Merge pull request #2478 from yingcong-wu/yc/1218-libcxx-mess
Browse files Browse the repository at this point in the history
[DeviceSanitizer] When link with libc++, link the gcc_s first.
  • Loading branch information
kbenzie committed Jan 6, 2025
1 parent 02582da commit 326d800
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 326d800

Please sign in to comment.