1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:47:46 +00:00

DynamicLoader+LibC+LibTimeZone: Include LibTimeZone sources in LibC

LibTimeZone will be needed directly within LibC for functions such as
localtime(). This change adds LibTimeZone directly within LibC, so that
LibTimeZone isn't its own .so library anymore.

LibTimeZone itself is compiled as an object library to make it easier to
give it generator-specific compilation flags.
This commit is contained in:
Timothy Flynn 2022-01-20 11:09:05 -05:00 committed by Linus Groh
parent b873a222d7
commit 6988403d59
3 changed files with 4 additions and 4 deletions

View file

@ -130,7 +130,7 @@ set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES} ${ASM_SOURCES})
set_source_files_properties(stdio.cpp PROPERTIES COMPILE_FLAGS "-fno-builtin-fputc -fno-builtin-fputs -fno-builtin-fwrite")
add_library(LibCStaticWithoutDeps STATIC ${SOURCES})
target_link_libraries(LibCStaticWithoutDeps ssp)
target_link_libraries(LibCStaticWithoutDeps ssp LibTimeZone)
add_dependencies(LibCStaticWithoutDeps LibM LibSystem LibUBSanitizer)
add_custom_target(LibCStatic
@ -154,7 +154,7 @@ set_property(
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nolibc")
serenity_libc(LibC c)
add_dependencies(LibC crti crt0 crt0_shared crtn)
target_link_libraries(LibC ssp system)
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)