From 78c2fad89ccadc25b7961b209b2535bd59978dd0 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 17 Sep 2023 13:20:04 -0600 Subject: [PATCH] LibTimeZone: Include generated files before checked-in files This is a rickety solution to a problem when using LibTimeZone as a static archive, like we do for Android. When pulling symbols from an archive into a shared library, lld will pick the weak symbols for our timezone helpers and keep them. Even if there's a strong symbol in another object file in the same archive, it ignores them. However, if we make sure that the strong symbols for the generated files are first in the list, then we avoid the problem altogether by relying on linker specifics. --- Userland/Libraries/LibTimeZone/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibTimeZone/CMakeLists.txt b/Userland/Libraries/LibTimeZone/CMakeLists.txt index a92f60a8b5..c1cf99953b 100644 --- a/Userland/Libraries/LibTimeZone/CMakeLists.txt +++ b/Userland/Libraries/LibTimeZone/CMakeLists.txt @@ -1,8 +1,8 @@ include(${SerenityOS_SOURCE_DIR}/Meta/CMake/time_zone_data.cmake) set(SOURCES - TimeZone.cpp ${TIME_ZONE_DATA_SOURCES} + TimeZone.cpp ) set(GENERATED_SOURCES ${CURRENT_LIB_GENERATED})