summaryrefslogtreecommitdiff
path: root/configure.py
diff options
context:
space:
mode:
authorNickNaso <nicoladelgobbo@gmail.com>2019-05-23 11:57:31 +0200
committerGabriel Schulhof <gabriel.schulhof@intel.com>2019-07-01 22:07:42 -0700
commit9868126546b93ed992cff094e1884af3a88460a3 (patch)
treeae495efbc2fecb962a8a5b1c45bb8856c1ba8997 /configure.py
parente008ca8b93af0eb5e360ee1244680c914a795344 (diff)
downloadnode-new-9868126546b93ed992cff094e1884af3a88460a3.tar.gz
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 'configure.py')
-rwxr-xr-xconfigure.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index 6ecc33174b..4985200b28 100755
--- a/configure.py
+++ b/configure.py
@@ -34,6 +34,7 @@ import nodedownload
# imports in tools/
sys.path.insert(0, 'tools')
import getmoduleversion
+import getnapibuildversion
from gyp_node import run_gyp
# imports in deps/v8/tools/node
@@ -1147,6 +1148,10 @@ def configure_node(o):
else:
o['variables']['node_target_type'] = 'executable'
+def configure_napi(output):
+ version = getnapibuildversion.get_napi_version()
+ output['variables']['napi_build_version'] = version
+
def configure_library(lib, output):
shared_lib = 'shared_' + lib
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
@@ -1626,6 +1631,7 @@ if (options.dest_os):
flavor = GetFlavor(flavor_params)
configure_node(output)
+configure_napi(output)
configure_library('zlib', output)
configure_library('http_parser', output)
configure_library('libuv', output)