WebWorker: Enable in Windows CI

This commit is contained in:
ayeteadoe 2025-06-28 13:24:09 -07:00 committed by Andrew Kaster
commit 0847ca4854
Notes: github-actions[bot] 2025-08-23 22:07:08 +00:00
2 changed files with 24 additions and 1 deletions

View file

@ -20,3 +20,19 @@ add_executable(WebWorker main.cpp)
target_include_directories(WebWorker PRIVATE ${LADYBIRD_SOURCE_DIR})
target_link_libraries(WebWorker PRIVATE webworkerservice)
if(WIN32)
# FIXME: This is a hack to get around lld-link error undefined symbols in various libraries
target_link_libraries(webworkerservice PRIVATE
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,CallbackType>
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,DedicatedWorkerGlobalScope>
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,EnvironmentSettingsSnapshot>
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,EventNames>
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,SharedWorkerGlobalScope>
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Tracing>
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,WorkerDebugConsoleClient>
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,WorkerLocation>
)
find_package(pthread REQUIRED)
target_include_directories(WebWorker PRIVATE $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
endif()

View file

@ -84,7 +84,11 @@ ErrorOr<int> ladybird_main(Main::Arguments arguments)
static ErrorOr<void> initialize_image_decoder(int image_decoder_socket)
{
#if !defined(AK_OS_WINDOWS)
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
#else
static_assert(IsSame<IPC::Transport, IPC::TransportSocketWindows>, "Need to handle other IPC transports here");
#endif
auto socket = TRY(Core::LocalSocket::adopt_fd(image_decoder_socket));
TRY(socket->set_blocking(true));
@ -101,8 +105,11 @@ static ErrorOr<void> initialize_image_decoder(int image_decoder_socket)
static ErrorOr<void> initialize_resource_loader(GC::Heap& heap, int request_server_socket)
{
#if !defined(AK_OS_WINDOWS)
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
#else
static_assert(IsSame<IPC::Transport, IPC::TransportSocketWindows>, "Need to handle other IPC transports here");
#endif
auto socket = TRY(Core::LocalSocket::adopt_fd(request_server_socket));
TRY(socket->set_blocking(true));