Meta: Remove obsolete Lagom host-tools build
This commit is contained in:
parent
4a681c9148
commit
2dc3e3da55
11 changed files with 15 additions and 137 deletions
9
.github/workflows/lagom-template.yml
vendored
9
.github/workflows/lagom-template.yml
vendored
|
|
@ -161,18 +161,11 @@ jobs:
|
|||
VCPKG_CACHE_SAS: ${{ github.ref == 'refs/heads/master' && secrets.VCPKG_CACHE_SAS || '' }}
|
||||
VCPKG_CACHE_MODE: ${{ github.ref == 'refs/heads/master' && 'write' || '' }}
|
||||
run: |
|
||||
cmake --preset=Host_Tools -B "${GITHUB_WORKSPACE}/Build/host-tools-build" \
|
||||
${{ steps.build-parameters.outputs.cmake_options }} \
|
||||
-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python
|
||||
|
||||
ninja -C "${GITHUB_WORKSPACE}/Build/host-tools-build" install
|
||||
|
||||
cmake --preset ${{ inputs.build_preset }} -B Build \
|
||||
${{ steps.build-parameters.outputs.cmake_options }} \
|
||||
-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \
|
||||
-DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }} \
|
||||
-DLagomTools_DIR=${GITHUB_WORKSPACE}/Build/host-tools/share/LagomTools
|
||||
-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }}
|
||||
|
||||
# === BUILD ===
|
||||
|
||||
|
|
|
|||
|
|
@ -68,15 +68,6 @@ if (ENABLE_FUZZERS_LIBFUZZER OR ENABLE_FUZZERS_OSSFUZZ)
|
|||
set(ENABLE_FUZZERS ON)
|
||||
endif()
|
||||
|
||||
# We need to make sure not to build code generators for Fuzzer builds, as they already have their own main.cpp
|
||||
# Instead, we import them from a previous install of Lagom. This mandates a two-stage build for fuzzers.
|
||||
# The same concern goes for cross-compile builds, where we need the tools built for the host
|
||||
set(BUILD_LAGOM_TOOLS ON)
|
||||
if (ENABLE_FUZZERS OR CMAKE_CROSSCOMPILING)
|
||||
find_package(LagomTools REQUIRED)
|
||||
set(BUILD_LAGOM_TOOLS OFF)
|
||||
endif()
|
||||
|
||||
if (ENABLE_COMPILETIME_FORMAT_CHECK)
|
||||
add_compile_definitions(ENABLE_COMPILETIME_FORMAT_CHECK)
|
||||
endif()
|
||||
|
|
@ -134,15 +125,6 @@ add_lagom_library_install_rules(JSClangPlugin)
|
|||
add_subdirectory(AK)
|
||||
add_subdirectory(Libraries)
|
||||
|
||||
# Code Generators and other host tools
|
||||
if (BUILD_LAGOM_TOOLS)
|
||||
add_subdirectory(Meta/Lagom/Tools)
|
||||
endif()
|
||||
|
||||
if (LAGOM_TOOLS_ONLY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (ENABLE_FUZZERS)
|
||||
add_subdirectory(Meta/Lagom/Fuzzers)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ There are some optional features that can be enabled during compilation that are
|
|||
- `ENABLE_FUZZERS_OSSFUZZ`: builds OSS-Fuzz compatible [fuzzers](../Meta/Lagom/ReadMe.md#fuzzing) for various parts of the system.
|
||||
- `ENABLE_ALL_THE_DEBUG_MACROS`: used for checking whether debug code compiles on CI. This should not be set normally, as it clutters the console output and makes the system run very slowly. Instead, enable only the needed debug macros, as described below.
|
||||
- `ENABLE_COMPILETIME_FORMAT_CHECK`: checks for the validity of `std::format`-style format string during compilation. Enabled by default.
|
||||
- `LAGOM_TOOLS_ONLY`: Skips building libraries, utilities and tests for [Lagom](../Meta/Lagom/ReadMe.md). Mostly only useful for cross-compilation.
|
||||
- `INCLUDE_WASM_SPEC_TESTS`: downloads and includes the WebAssembly spec testsuite tests. In order to use this option, you will need to install `prettier` and `wasm-tools`.
|
||||
- `INCLUDE_FLAC_SPEC_TESTS`: downloads and includes the xiph.org FLAC test suite.
|
||||
- `LADYBIRD_CACHE_DIR`: sets the location of a shared cache of downloaded files. Should not need to be set manually unless managing a distribution package.
|
||||
|
|
|
|||
|
|
@ -1,30 +1,25 @@
|
|||
add_subdirectory(LibCore)
|
||||
add_subdirectory(LibFileSystem)
|
||||
add_subdirectory(LibMain)
|
||||
add_subdirectory(LibRegex)
|
||||
add_subdirectory(LibSync)
|
||||
add_subdirectory(LibTextCodec)
|
||||
add_subdirectory(LibUnicode)
|
||||
add_subdirectory(LibURL)
|
||||
|
||||
if (LAGOM_TOOLS_ONLY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_subdirectory(LibCompress)
|
||||
add_subdirectory(LibCore)
|
||||
add_subdirectory(LibCrypto)
|
||||
add_subdirectory(LibDNS)
|
||||
add_subdirectory(LibDatabase)
|
||||
add_subdirectory(LibDiff)
|
||||
add_subdirectory(LibDNS)
|
||||
add_subdirectory(LibFileSystem)
|
||||
add_subdirectory(LibGC)
|
||||
add_subdirectory(LibHTTP)
|
||||
add_subdirectory(LibIPC)
|
||||
add_subdirectory(LibJS)
|
||||
add_subdirectory(LibMain)
|
||||
add_subdirectory(LibRegex)
|
||||
add_subdirectory(LibRequests)
|
||||
add_subdirectory(LibSync)
|
||||
add_subdirectory(LibSyntax)
|
||||
add_subdirectory(LibTest)
|
||||
add_subdirectory(LibThreading)
|
||||
add_subdirectory(LibTLS)
|
||||
add_subdirectory(LibTest)
|
||||
add_subdirectory(LibTextCodec)
|
||||
add_subdirectory(LibThreading)
|
||||
add_subdirectory(LibURL)
|
||||
add_subdirectory(LibUnicode)
|
||||
add_subdirectory(LibWasm)
|
||||
add_subdirectory(LibWebSocket)
|
||||
add_subdirectory(LibXML)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ option(ENABLE_MEMORY_SANITIZER "Enable memory sanitizer testing in gcc/clang" OF
|
|||
option(ENABLE_FUZZERS "Build fuzzing targets" OFF)
|
||||
option(ENABLE_FUZZERS_LIBFUZZER "Build fuzzers using Clang's libFuzzer" OFF)
|
||||
option(ENABLE_FUZZERS_OSSFUZZ "Build OSS-Fuzz compatible fuzzers" OFF)
|
||||
option(LAGOM_TOOLS_ONLY "Don't build libraries, utilities and tests, only host build tools" OFF)
|
||||
option(ENABLE_LAGOM_CCACHE "Enable ccache for Lagom builds" ON)
|
||||
set(LAGOM_USE_LINKER "" CACHE STRING "The linker to use (e.g. lld, mold) instead of the system default")
|
||||
set(LAGOM_LINK_POOL_SIZE "" CACHE STRING "The maximum number of parallel jobs to use for linking")
|
||||
|
|
|
|||
|
|
@ -95,22 +95,6 @@
|
|||
"ENABLE_FUZZERS_LIBFUZZER": "ON",
|
||||
"ENABLE_ADDRESS_SANITIZER": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"hidden": true,
|
||||
"name": "Host_Tools_base",
|
||||
"displayName": "Host Tools Config",
|
||||
"description": "Host tools build",
|
||||
"binaryDir": "$env{LADYBIRD_SOURCE_DIR}/Build/host-tools-build",
|
||||
"cacheVariables": {
|
||||
"package": "LagomTools",
|
||||
"BUILD_SHARED_LIBS": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"VCPKG_OVERLAY_TRIPLETS": "$env{LADYBIRD_SOURCE_DIR}/Meta/CMake/vcpkg/distribution-triplets",
|
||||
"LAGOM_TOOLS_ONLY": "ON",
|
||||
"INSTALL_LAGOM_TOOLS": "ON",
|
||||
"CMAKE_INSTALL_PREFIX": "$env{LADYBIRD_SOURCE_DIR}/Build/host-tools"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
|
|
|
|||
|
|
@ -55,13 +55,6 @@
|
|||
"unix_base",
|
||||
"All_Debug_base"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Host_Tools",
|
||||
"inherits": [
|
||||
"unix_base",
|
||||
"Host_Tools_base"
|
||||
]
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
|
|
|
|||
|
|
@ -5,41 +5,9 @@ set -e
|
|||
LADYBIRD_SOURCE_DIR="$(dirname "${0}")"/../..
|
||||
cd "${LADYBIRD_SOURCE_DIR}"
|
||||
|
||||
die() {
|
||||
>&2 echo "die: $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Save flags for oss-fuzz to avoid fuzzing Tools/
|
||||
# https://google.github.io/oss-fuzz/getting-started/new-project-guide/#temporarily-disabling-code-instrumentation-during-builds
|
||||
CFLAGS_SAVE="$CFLAGS"
|
||||
CXXFLAGS_SAVE="$CXXFLAGS"
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
export AFL_NOOPT=1
|
||||
|
||||
if [ "$#" -gt "0" ] && [ "--oss-fuzz" = "$1" ] ; then
|
||||
CXXFLAGS="$CXXFLAGS -DOSS_FUZZ=ON"
|
||||
fi
|
||||
|
||||
# FIXME: Replace these CMake invocations with a CMake superbuild?
|
||||
echo "Building Lagom Tools..."
|
||||
|
||||
. "Meta/Utils/find_compiler.sh"
|
||||
pick_host_compiler --clang-only
|
||||
|
||||
cmake -S "$LADYBIRD_SOURCE_DIR" -GNinja --preset=Host_Tools \
|
||||
-B "$LADYBIRD_SOURCE_DIR"/Build/host-tools-build \
|
||||
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
||||
-DCMAKE_C_COMPILER="${CC}" \
|
||||
-DCMAKE_CXX_COMPILER="${CXX}"
|
||||
ninja -C "$LADYBIRD_SOURCE_DIR"/Build/host-tools-build install
|
||||
|
||||
# Restore flags for oss-fuzz
|
||||
export CFLAGS="${CFLAGS_SAVE}"
|
||||
export CXXFLAGS="${CXXFLAGS_SAVE}"
|
||||
unset AFL_NOOPT
|
||||
|
||||
echo "Building Lagom Fuzzers..."
|
||||
|
||||
if [ "$#" -gt "0" ] && [ "--oss-fuzz" = "$1" ] ; then
|
||||
|
|
@ -51,20 +19,17 @@ if [ "$#" -gt "0" ] && [ "--oss-fuzz" = "$1" ] ; then
|
|||
-DCMAKE_C_COMPILER="${CC}" \
|
||||
-DCMAKE_CXX_COMPILER="${CXX}" \
|
||||
-DCMAKE_CXX_FLAGS="$CXXFLAGS -DOSS_FUZZ=ON" \
|
||||
-DLINKER_FLAGS="$LIB_FUZZING_ENGINE" \
|
||||
-DLagomTools_DIR="$LADYBIRD_SOURCE_DIR"/Build/host-tools/share/LagomTools
|
||||
-DLINKER_FLAGS="$LIB_FUZZING_ENGINE"
|
||||
ninja -C "$LADYBIRD_SOURCE_DIR"/Build/fuzzers
|
||||
cp "$LADYBIRD_SOURCE_DIR"/Build/fuzzers/bin/Fuzz* "$OUT"/
|
||||
elif [ "$#" -gt "0" ] && [ "--standalone" = "$1" ] ; then
|
||||
echo "Building for standalone fuzz configuration..."
|
||||
cmake -S "$LADYBIRD_SOURCE_DIR" -GNinja -B "$LADYBIRD_SOURCE_DIR"/Build/lagom-fuzzers-standalone \
|
||||
-DENABLE_FUZZERS=ON \
|
||||
-DLagomTools_DIR="$LADYBIRD_SOURCE_DIR"/Build/host-tools/share/LagomTools
|
||||
-DENABLE_FUZZERS=ON
|
||||
ninja -C "$LADYBIRD_SOURCE_DIR"/Build/lagom-fuzzers-standalone
|
||||
else
|
||||
echo "Building for local fuzz configuration..."
|
||||
cmake -S "$LADYBIRD_SOURCE_DIR" -GNinja --preset Fuzzers -B "$LADYBIRD_SOURCE_DIR"/Build/lagom-fuzzers \
|
||||
-DLagomTools_DIR="$LADYBIRD_SOURCE_DIR"/Build/host-tools/share/LagomTools \
|
||||
-DCMAKE_C_COMPILER="${CC}" \
|
||||
-DCMAKE_CXX_COMPILER="${CXX}"
|
||||
ninja -C "$LADYBIRD_SOURCE_DIR"/Build/lagom-fuzzers
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
function(lagom_tool tool)
|
||||
cmake_parse_arguments(LAGOM_TOOL "" "INSTALL" "SOURCES;LIBS" ${ARGN})
|
||||
add_executable(${tool} ${SOURCES} ${LAGOM_TOOL_SOURCES})
|
||||
# alias for parity with exports
|
||||
add_executable(Lagom::${tool} ALIAS ${tool})
|
||||
target_link_libraries(${tool} AK LibCore LibFileSystem GenericClangPlugin ${LAGOM_TOOL_LIBS})
|
||||
if (NOT LAGOM_TOOL_INSTALL)
|
||||
set(LAGOM_TOOL_INSTALL ${INSTALL_LAGOM_TOOLS})
|
||||
endif()
|
||||
if (DEFINED LAGOM_TOOL_INSTALL AND LAGOM_TOOL_INSTALL)
|
||||
install(
|
||||
TARGETS ${tool}
|
||||
EXPORT LagomTargets
|
||||
RUNTIME COMPONENT Lagom_Runtime
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
@ -142,9 +142,7 @@ def main():
|
|||
if "target" in args:
|
||||
if platform.host_system != HostSystem.Windows and args.target == "ladybird":
|
||||
args.target = "Ladybird"
|
||||
if not args.target and not (
|
||||
args.command in ("build", "rebuild") or (args.preset == "Host_Tools" and args.command == "install")
|
||||
):
|
||||
if not args.target and args.command not in ("build", "rebuild"):
|
||||
args.target = "ladybird" if platform.host_system == HostSystem.Windows else "Ladybird"
|
||||
|
||||
if args.command == "build":
|
||||
|
|
@ -295,7 +293,6 @@ def configure_build_env(platform: Platform, preset: str, jobs: Optional[str] = N
|
|||
"Distribution": build_root_dir / "distribution",
|
||||
"Release": build_root_dir / "release",
|
||||
"Sanitizer": build_root_dir / "sanitizers",
|
||||
"Host_Tools": build_root_dir / "host-tools-build",
|
||||
}
|
||||
|
||||
build_preset_dir = known_presets.get(preset, None)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||
|
||||
plugins {
|
||||
id("com.android.application") version "8.11.0"
|
||||
id("org.jetbrains.kotlin.android") version "2.1.20"
|
||||
|
|
@ -9,15 +7,6 @@ var buildDir = layout.buildDirectory.get()
|
|||
var cacheDir = System.getenv("LADYBIRD_CACHE_DIR") ?: "$buildDir/caches"
|
||||
var sourceDir = layout.projectDirectory.dir("../../").toString()
|
||||
|
||||
task<Exec>("buildHostTools") {
|
||||
commandLine = listOf("$sourceDir/Meta/ladybird.py", "install", "--preset", "Host_Tools")
|
||||
environment = mapOf(
|
||||
"PATH" to System.getenv("PATH")!!
|
||||
)
|
||||
}
|
||||
tasks.named("preBuild").dependsOn("buildHostTools")
|
||||
tasks.named("prepareKotlinBuildScriptModel").dependsOn("buildHostTools")
|
||||
|
||||
android {
|
||||
namespace = "org.serenityos.ladybird"
|
||||
compileSdk = 35
|
||||
|
|
@ -36,7 +25,6 @@ android {
|
|||
cmake {
|
||||
cppFlags += "-std=c++23"
|
||||
arguments += listOf(
|
||||
"-DLagomTools_DIR=$buildDir/host-tools/share/LagomTools",
|
||||
"-DANDROID_STL=c++_shared",
|
||||
"-DLADYBIRD_CACHE_DIR=$cacheDir",
|
||||
"-DVCPKG_ROOT=$sourceDir/Build/vcpkg",
|
||||
|
|
|
|||
Loading…
Reference in a new issue