mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
CMake: Force-link clang_rt.profile.a to LibC when building with coverage
This used to be in place until 671712cae6
.
I had commented on that PR that "yeah should be good to remove". Turns
out that's not the case. A future patch to the clang driver might make
this obsolete :^).
This commit is contained in:
parent
bee31d2f90
commit
8356677868
1 changed files with 3 additions and 0 deletions
|
@ -89,6 +89,9 @@ function(serenity_libc target_name fs_name)
|
|||
# Avoid creating a dependency cycle between system libraries and the C++ standard library. This is necessary
|
||||
# to ensure that initialization functions will be called in the right order (libc++ must come after LibPthread).
|
||||
target_link_options(${target_name} PRIVATE -static-libstdc++)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$" AND ENABLE_USERSPACE_COVERAGE_COLLECTION)
|
||||
target_link_libraries(${target_name} PRIVATE clang_rt.profile)
|
||||
endif()
|
||||
target_link_directories(LibC PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||
serenity_generated_sources(${target_name})
|
||||
endfunction()
|
||||
|
|
Loading…
Reference in a new issue