mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
61cf20582c
In particular, define a static LibC library *in LibC's CMakeLists* and use it in DynamicLoader. This is similar to the way LibELF is included in DynamicLoader. Additionally, compile DynamicLoader with -ffunction-sections, -fdata-sections, and -Wl,--gc-sections. This brings the loader size from ~2Mb to ~1Mb with debug symbols and from ~500Kb to ~150Kb without. Also, this makes linking DynamicLoader with LibTimeZone unnecessary.
11 lines
300 B
CMake
11 lines
300 B
CMake
set(SOURCES
|
|
syscall.cpp
|
|
)
|
|
|
|
serenity_libc(LibSystem system)
|
|
add_dependencies(LibSystem install_libc_headers)
|
|
target_link_options(LibSystem PRIVATE -nostdlib)
|
|
|
|
add_library(DynamicLoader_LibSystem STATIC ${SOURCES})
|
|
target_link_libraries(DynamicLoader_LibSystem PUBLIC DynamicLoader_CompileOptions)
|