LibC: Remove the LibM interface target

This commit is contained in:
Tim Schumacher 2022-09-06 01:03:59 +02:00 committed by Brian Gianforcaro
parent 1b25c38b8b
commit ef9b543426
Notes: sideshowbarker 2024-07-17 07:06:13 +09:00
5 changed files with 6 additions and 10 deletions

View File

@ -153,7 +153,7 @@ endif()
add_library(LibCStaticWithoutDeps STATIC ${SOURCES})
target_link_libraries(LibCStaticWithoutDeps PUBLIC ssp LibTimeZone PRIVATE NoCoverage)
add_dependencies(LibCStaticWithoutDeps LibM LibSystem LibUBSanitizer)
add_dependencies(LibCStaticWithoutDeps LibSystem LibUBSanitizer)
add_custom_target(LibCStatic
COMMAND ${CMAKE_AR} -x $<TARGET_FILE:LibCStaticWithoutDeps>
@ -179,13 +179,9 @@ add_dependencies(LibC crti crt0 crt0_shared crtn)
target_link_libraries(LibC ssp system LibTimeZone)
# We mark LibCStatic as a dependency of LibC because this triggers the build of the LibCStatic target
add_dependencies(LibC LibM LibSystem LibCStatic)
add_dependencies(LibC LibSystem LibCStatic)
# Provide a linker script instead of various other libraries that tells everything to link against LibC.
file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libpthread.so" "INPUT(libc.so)")
file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libdl.so" "INPUT(libc.so)")
# Provide a dummy target and a linker script for LibM that tells everything to link against LibC instead.
add_library(LibM INTERFACE)
target_link_libraries(LibM INTERFACE LibC)
file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libm.so" "INPUT(libc.so)")

View File

@ -15,4 +15,4 @@ set(SOURCES
)
serenity_lib(LibGL gl)
target_link_libraries(LibGL LibM LibCore LibGfx LibGPU)
target_link_libraries(LibGL LibCore LibGfx LibGPU)

View File

@ -51,4 +51,4 @@ set(SOURCES
)
serenity_lib(LibGfx gfx)
target_link_libraries(LibGfx LibM LibCompress LibCore LibTextCodec LibIPC)
target_link_libraries(LibGfx LibCompress LibCore LibTextCodec LibIPC)

View File

@ -249,4 +249,4 @@ set(SOURCES
)
serenity_lib(LibJS js)
target_link_libraries(LibJS LibM LibCore LibCrypto LibRegex LibSyntax LibLocale LibUnicode)
target_link_libraries(LibJS LibCore LibCrypto LibRegex LibSyntax LibLocale LibUnicode)

View File

@ -8,4 +8,4 @@ set(SOURCES
add_compile_options(-Wno-psabi)
serenity_lib(LibSoftGPU softgpu)
target_link_libraries(LibSoftGPU LibM LibCore LibGfx)
target_link_libraries(LibSoftGPU LibCore LibGfx)