-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add --v8-lite-mode flag #33541
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not opposed, just want to point out that a "lite mode" build is identical to starting node with --lite_mode --jitless
(and --lite_mode
is a no-op nowadays, only --jitless
does something.)
In other words, this PR is shorthand for ./configure --v8-options="--lite_mode --jitless"
but with a better help text. :-)
CI: https://ci.nodejs.org/job/node-test-pull-request/31589/ 💛 (known flake: parallel/test-http2-reset-flood) |
PR-URL: nodejs#33541 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 01c4455 |
PR-URL: #33541 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33541 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33541 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
This small change just exposes the V8 compilation option for Lite Mode (see https://v8.dev/blog/v8-lite) which also implies jitless (see https://v8.dev/blog/jitless) when set.
It should be useful in some niche scenarios like compiling for memory constrained platforms or those that don't allow for just in time compilation (like iOS).
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesThe tests do not pass when compiling with this flag activated due to V8 not supporting webassebly in lite mode. The normal build is unaffected and the tests pass.
No additional tests or benchmarks added. The V8 team has an extensive overview of the lite mode.
I'm not sure if the flag needs to be added to documentation. It's pretty niche and other similar flags don't seem to be documented as far as I can tell.