From 0413aefe991e53eb7b562223e2951f96faaa6241 Mon Sep 17 00:00:00 2001 From: Andrew Neitsch Date: Wed, 4 Mar 2020 16:34:28 -0700 Subject: [PATCH] cli: allow --jitless V8 flag in NODE_OPTIONS This work is modeled on #30094 which allowed `--disallow-code-generation-from-strings` in `NODE_OPTIONS`. The `--jitless` v8 option has been supported since 12.0.0. As a v8 option, node automatically picks it up, but there have been a few issues that were resolved by simply telling users about the option: #26758, This PR: - allows `--jitless` in `NODE_OPTIONS` - documents `--jitless` - moves `--experimental-loader=module` to locally restore alphabetical order in option documentation Refs: https://github.com/nodejs/node/pull/30094 Refs: https://github.com/nodejs/node/issues/26758 Refs: https://github.com/nodejs/node/issues/28800 PR-URL: https://github.com/nodejs/node/pull/32100 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Sam Roberts Reviewed-By: Gus Caplan Reviewed-By: Shelley Vohr Reviewed-By: David Carlier Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Ruben Bridgewater --- doc/api/cli.md | 30 +++++++++++++++++++------- doc/node.1 | 20 +++++++++++------ src/node_options.cc | 4 ++++ test/parallel/test-cli-node-options.js | 1 + 4 files changed, 41 insertions(+), 14 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index b1e26866d23fb9..6ba36e1dfc3a45 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -163,6 +163,14 @@ added: v12.9.0 Enable experimental JSON support for the ES Module loader. +### `--experimental-loader=module` + + +Specify the `module` of a custom [experimental ECMAScript Module loader][]. +`module` may be either a path to a file, or an ECMAScript Module name. + ### `--experimental-modules` - -Specify the `module` of a custom [experimental ECMAScript Module loader][]. -`module` may be either a path to a file, or an ECMAScript Module name. - ### `--insecure-http-parser` + +Disable [runtime allocation of executable memory][jitless]. This may be +required on some platforms for security reasons. It can also reduce attack +surface on other platforms, but the performance impact may be severe. + +This flag is inherited from V8 and is subject to change upstream. It may +disappear in a non-semver-major release. + ### `--max-http-header-size=size`