mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:07:34 +00:00
LibUnicode: Compile generated sources optimized for size
This breaks LibUnicode into two libraries: LibUnicode containing the public APIs for accessing the library, and LibUnicodeData containing the generated source files. LibUnicodeData has compile options optimized for size, which save about 1MB of data in total.
This commit is contained in:
parent
ed9c79e131
commit
92233660b8
1 changed files with 12 additions and 2 deletions
|
@ -1,7 +1,13 @@
|
|||
include(${SerenityOS_SOURCE_DIR}/Meta/CMake/unicode_data.cmake)
|
||||
|
||||
SET(SOURCES
|
||||
${UNICODE_DATA_SOURCES}
|
||||
if (DEFINED UNICODE_DATA_SOURCES)
|
||||
set(SOURCES ${UNICODE_DATA_SOURCES})
|
||||
serenity_lib(LibUnicodeData unicodedata)
|
||||
target_compile_options(LibUnicodeData PRIVATE -g0 -Os)
|
||||
target_link_libraries(LibUnicodeData LibCore)
|
||||
endif()
|
||||
|
||||
set(SOURCES
|
||||
CharacterTypes.cpp
|
||||
CurrencyCode.cpp
|
||||
DateTimeFormat.cpp
|
||||
|
@ -12,3 +18,7 @@ SET(SOURCES
|
|||
serenity_lib(LibUnicode unicode)
|
||||
target_link_libraries(LibUnicode LibCore)
|
||||
target_compile_definitions(LibUnicode PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
|
||||
|
||||
if (DEFINED UNICODE_DATA_SOURCES)
|
||||
target_link_libraries(LibUnicode LibUnicodeData)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue