summaryrefslogtreecommitdiff
path: root/Meta/CMake
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-09-14 14:10:23 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-09-16 05:39:28 +0000
commit671712cae67d7b8782afa94c09e980a77450efd6 (patch)
tree6cf1c5156ee4027343f5809d3d80a2b3fb0ff3ed /Meta/CMake
parent88ff01bb1718ad6342ebd769fc31147f9cc5806f (diff)
downloadserenity-671712cae67d7b8782afa94c09e980a77450efd6.zip
CMake: Use `-static-libstdc++` on Clang as well
This resolves an old FIXME that we added ages ago, and our LLVM driver apparently gained support for `-static-libstdc++` somewhere along the way.
Diffstat (limited to 'Meta/CMake')
-rw-r--r--Meta/CMake/utils.cmake14
1 files changed, 1 insertions, 13 deletions
diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake
index 61af57ad88..ee1d26dd0e 100644
--- a/Meta/CMake/utils.cmake
+++ b/Meta/CMake/utils.cmake
@@ -68,19 +68,7 @@ function(serenity_libc target_name fs_name)
set_target_properties(${target_name} PROPERTIES OUTPUT_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).
- if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- target_link_options(${target_name} PRIVATE -static-libstdc++)
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
- target_link_libraries(${target_name} clang_rt.builtins)
- # FIXME: Implement -static-libstdc++ in the next toolchain update.
- target_link_options(${target_name} PRIVATE -nostdlib++ -Wl,-Bstatic -lc++ -Wl,-Bdynamic)
- if (NOT ENABLE_MOLD_LINKER)
- target_link_options(${target_name} PRIVATE -Wl,--no-dependent-libraries)
- endif()
- if (ENABLE_USERSPACE_COVERAGE_COLLECTION)
- target_link_libraries(${target_name} clang_rt.profile)
- endif()
- endif()
+ target_link_options(${target_name} PRIVATE -static-libstdc++)
target_link_directories(LibC PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
serenity_generated_sources(${target_name})
endfunction()