feat: add v8_lite_mode cargo feature for jitless builds#1979
Open
bartlomieju wants to merge 3 commits into
Open
feat: add v8_lite_mode cargo feature for jitless builds#1979bartlomieju wants to merge 3 commits into
bartlomieju wants to merge 3 commits into
Conversation
Adds an opt-in `v8_lite_mode` feature that builds V8 in jitless mode with Turbofan, Maglev and Sparkplug disabled. WebAssembly support is retained via the DrumBrake interpreter, which requires pointer compression, so the feature transitively enables `v8_enable_pointer_compression`. The build.rs wiring emits the corresponding GN args (v8_jitless, v8_enable_turbofan, v8_enable_maglev, v8_enable_sparkplug, v8_enable_webassembly, v8_enable_drumbrake) and a new `_lite` prebuilt binary suffix. New release-only CI matrix entries publish lite-mode archives for the macOS, Linux and Windows x64/arm64 targets supported by DrumBrake.
|
Oh, I was just about to try out JIT-less build in a side project.😃 |
Member
Author
Not directly, this is only for experiment to see how small V8 build can be. |
The DrumBrake interpreter currently fails to build against this V8 revision: wasm-interpreter-runtime.cc uses inline accessors from wasm-objects-inl.h without including it, tripping -Werror,-Wundefined-inline. Disable WebAssembly in lite mode for now; we can reintroduce DrumBrake once that V8 source issue is fixed upstream.
V8's jitless-only code paths have latent warnings (e.g. unused 'is_code' label in builtins-x64.cc when V8_JITLESS_BOOL is true) that fire under -Werror,-Wunused-variable. Drop treat_warnings_as_errors for the lite_mode build variant only; the default build still treats warnings as errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an opt-in cargo feature,
v8_lite_mode, that produces a smallerprebuilt static-library archive by building V8 with the optimizing JIT
tiers compiled out: Turbofan, Maglev and Sparkplug are disabled and the
runtime is switched to jitless mode. WebAssembly support is retained
via the DrumBrake interpreter, so embedders that don't need the JIT
tiers can still run Wasm.
DrumBrake requires pointer compression and only supports x64/arm64 on
macOS, Linux and Windows, so the feature transitively enables
v8_enable_pointer_compressionand the CI matrix publishes theresulting
_ptrcomp_literelease archive for exactly those targets.build.rs maps the feature to the corresponding GN args
(
v8_jitless,v8_enable_turbofan,v8_enable_maglev,v8_enable_sparkplug,v8_enable_webassembly,v8_enable_drumbrake)and threads
_litethrough the prebuilt binary suffix.