diff options
author | NickNaso <nicoladelgobbo@gmail.com> | 2019-05-23 11:57:31 +0200 |
---|---|---|
committer | Gabriel Schulhof <gabriel.schulhof@intel.com> | 2019-07-01 22:07:42 -0700 |
commit | 9868126546b93ed992cff094e1884af3a88460a3 (patch) | |
tree | ae495efbc2fecb962a8a5b1c45bb8856c1ba8997 /src | |
parent | e008ca8b93af0eb5e360ee1244680c914a795344 (diff) | |
download | android-node-v8-9868126546b93ed992cff094e1884af3a88460a3.tar.gz android-node-v8-9868126546b93ed992cff094e1884af3a88460a3.tar.bz2 android-node-v8-9868126546b93ed992cff094e1884af3a88460a3.zip |
build: expose napi_build_version variable
Expose `napi_build_version` to allow `node-gyp` to make it
available for building native addons.
Fixes: https://github.com/nodejs/node-gyp/issues/1745
Refs: https://github.com/nodejs/abi-stable-node/issues/371
PR-URL: https://github.com/nodejs/node/pull/27835
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/js_native_api.h | 7 | ||||
-rw-r--r-- | src/node_version.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/js_native_api.h b/src/js_native_api.h index 0646a2d94c..4f9345a4ab 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -12,7 +12,12 @@ #ifdef NAPI_EXPERIMENTAL #define NAPI_VERSION NAPI_VERSION_EXPERIMENTAL #else -// The baseline version for N-API +// The baseline version for N-API. +// The NAPI_VERSION controls which version will be used by default when +// compilling a native addon. If the addon developer specifically wants to use +// functions available in a new version of N-API that is not yet ported in all +// LTS versions, they can set NAPI_VERSION knowing that they have specifically +// depended on that version. #define NAPI_VERSION 4 #endif #endif diff --git a/src/node_version.h b/src/node_version.h index 1e560410e0..768f6fcb1c 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -91,7 +91,8 @@ */ #define NODE_MODULE_VERSION 74 -// the NAPI_VERSION provided by this version of the runtime +// The NAPI_VERSION provided by this version of the runtime. This is the version +// which the Node binary being built supports. #define NAPI_VERSION 4 #endif // SRC_NODE_VERSION_H_ |