mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Lagom: Add option to build Ladybird as part of a Lagom build
This means that Ladybird can be built with either Meta/Lagom or Ladybird as the top-level source directory. This setup is a bit awkward, but will preserve the packaging story for Ladybird until we come up with a more permanent solution.
This commit is contained in:
parent
b4d80f92ec
commit
0384513779
Notes:
sideshowbarker
2024-07-17 02:37:48 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/0384513779 Pull-request: https://github.com/SerenityOS/serenity/pull/16583 Reviewed-by: https://github.com/awesomekling ✅ Reviewed-by: https://github.com/linusg
2 changed files with 17 additions and 0 deletions
|
@ -12,3 +12,4 @@ serenity_option(ENABLE_FUZZERS_OSSFUZZ OFF CACHE BOOL "Build OSS-Fuzz compatible
|
|||
serenity_option(BUILD_LAGOM OFF CACHE BOOL "Build parts of the system targeting the host OS for fuzzing/testing")
|
||||
serenity_option(ENABLE_LAGOM_CCACHE ON CACHE BOOL "Enable ccache for Lagom builds")
|
||||
serenity_option(ENABLE_LAGOM_LIBWEB ON CACHE BOOL "Enable compiling LibWeb for Lagom builds")
|
||||
serenity_option(ENABLE_LAGOM_LADYBIRD OFF CACHE BOOL "Enable compiling Ladybird from Lagom")
|
||||
|
|
|
@ -42,6 +42,11 @@ if(ENABLE_ALL_THE_DEBUG_MACROS)
|
|||
include(all_the_debug_macros)
|
||||
endif()
|
||||
|
||||
# FIXME: Is it worth inventing `serenity_dependent_option` ?
|
||||
if (ENABLE_LAGOM_LADYBIRD)
|
||||
set(ENABLE_LAGOM_LIBWEB ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
# FIXME: BUILD_SHARED_LIBS has a default of OFF, as it's intended to be set by the
|
||||
# user when configuring the project. We should instead change libjs-test262
|
||||
# and oss-fuzz to set this option on their end, and enable it by default in
|
||||
|
@ -115,6 +120,13 @@ if (ENABLE_FUZZERS)
|
|||
add_compile_options(-fno-omit-frame-pointer)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LAGOM_LADYBIRD AND (ENABLE_FUZZERS OR ENABLE_COMPILER_EXPLORER_BUILD))
|
||||
message(FATAL_ERROR
|
||||
"Ladybird build not supported for Fuzzers or Compiler Explorer."
|
||||
"Disable ENABLE_LAGOM_LADYBIRD and try again."
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
|
||||
# Clang's default constexpr-steps limit is 1048576(2^20), GCC doesn't have one
|
||||
add_compile_options(-Wno-overloaded-virtual -Wno-user-defined-literals -fconstexpr-steps=16777216)
|
||||
|
@ -441,6 +453,10 @@ if (BUILD_LAGOM)
|
|||
|
||||
add_serenity_subdirectory(Userland/Shell)
|
||||
|
||||
if (ENABLE_LAGOM_LADYBIRD)
|
||||
add_serenity_subdirectory(Ladybird)
|
||||
endif()
|
||||
|
||||
if (NOT ENABLE_FUZZERS AND NOT ENABLE_COMPILER_EXPLORER_BUILD AND NOT ANDROID)
|
||||
# Lagom Services
|
||||
add_serenity_subdirectory(Userland/Services)
|
||||
|
|
Loading…
Reference in a new issue