Truly independent web browser
Meta: Target the baseline CPU in the Distribution preset
Jelle Raaijmakersfd21446b59de
diff --git a/.github/workflows/js-and-wasm-artifacts.yml b/.github/workflows/js-and-wasm-artifacts.ymlindex 5e6af801527..bb24d51f5cc 100644--- a/.github/workflows/js-and-wasm-artifacts.yml+++ b/.github/workflows/js-and-wasm-artifacts.yml@@ -90,7 +90,6 @@ jobs:cmake --preset Distribution \-DCMAKE_C_COMPILER=clang \-DCMAKE_CXX_COMPILER=clang++ \- -DLADYBIRD_BASELINE_CPU_TARGET=ON \-DENABLE_GUI_TARGETS=OFFif: ${{ matrix.os_name == 'Linux' }}diff --git a/.github/workflows/web-benchmarks.yml b/.github/workflows/web-benchmarks.ymlindex 395f0a3ad12..4e881417313 100644--- a/.github/workflows/web-benchmarks.yml+++ b/.github/workflows/web-benchmarks.yml@@ -106,7 +106,6 @@ jobs:working-directory: ${{ github.workspace }}run: |cmake --preset Distribution -B Build \- -DLADYBIRD_BASELINE_CPU_TARGET=ON \-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \-DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }}diff --git a/Documentation/AdvancedBuildInstructions.md b/Documentation/AdvancedBuildInstructions.mdindex 770c3023990..9222139396b 100644--- a/Documentation/AdvancedBuildInstructions.md+++ b/Documentation/AdvancedBuildInstructions.md@@ -33,7 +33,7 @@ There are some optional features that can be enabled during compilation that are- `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.- `ENABLE_JS_JIT`: builds the optimizing JIT for JavaScript. Enabled by default on x86-64 and AArch64 Linux and macOS and on x86-64 Windows, the platforms it generates code for. Without it, LibJS runs JavaScript in its interpreter alone, and the interpreter is built without the feedback collection and tier-up checks that only the JIT needs. See [the configuration of the JIT](../Libraries/LibJS/JIT/ARCHITECTURE.md#13-configuration).-- `LADYBIRD_BASELINE_CPU_TARGET`: builds C++ and Rust for a common CPU target instead of the build machine. Disabled by default; explicitly set `-DLADYBIRD_BASELINE_CPU_TARGET=ON` when packaging binaries for older machines. On x86-64 this is x86-64-v2 (SSE4.2 and POPCNT), so distributed binaries run without AVX, AVX2, BMI or LZCNT. Both the JavaScript and WebAssembly JITs remain available; WebAssembly selects newer instructions at runtime when supported.+- `LADYBIRD_BASELINE_CPU_TARGET`: builds C++ and Rust for a common CPU target instead of the build machine. Disabled by default and enabled by the `Distribution` preset; explicitly set `-DLADYBIRD_BASELINE_CPU_TARGET=ON` when packaging binaries for older machines with another configuration. On x86-64 this is x86-64-v2 (SSE4.2 and POPCNT), so distributed binaries run without AVX, AVX2, BMI or LZCNT. Both the JavaScript and WebAssembly JITs remain available; WebAssembly selects newer instructions at runtime when supported.- `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`.- `BUILD_BROWSER_TESTS_ONLY`: only builds the tests that run the browser's own executables, such as the LibWeb test suite and the WebDriver tests, and leaves out the test programs for individual libraries. Enabled by the `Distribution` preset.- `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.diff --git a/Meta/CMake/presets/CMakeBasePresets.json b/Meta/CMake/presets/CMakeBasePresets.jsonindex d55698193ba..c0a82329a14 100644--- a/Meta/CMake/presets/CMakeBasePresets.json+++ b/Meta/CMake/presets/CMakeBasePresets.json@@ -85,6 +85,7 @@"BUILD_BROWSER_TESTS_ONLY": "ON","BUILD_SHARED_LIBS": "OFF","CMAKE_BUILD_TYPE": "Release",+ "LADYBIRD_BASELINE_CPU_TARGET": "ON","LADYBIRD_GENERATE_SYMBOL_FILES": "ON","LADYBIRD_VCPKG_TYPE": "distribution"}