summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorStefan Budeanu <stefan@budeanu.com>2016-03-26 20:17:55 -0400
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2016-07-05 22:16:23 +0200
commit91744aaf00079843c3b079c11798821a83ebd407 (patch)
treedf19b0322c970ab6ffb063334833b7ac31511426 /configure
parentbc37e6a22dfd02ba8033e233651b4f88b38161e7 (diff)
downloadnode-new-91744aaf00079843c3b079c11798821a83ebd407.tar.gz
build: configure --shared
Add configure flag for building a shared library that can be embedded in other applications (like Electron). Add flags --without-bundled-v8 and --without-v8-platform to control V8 dependencies used. PR-URL: https://github.com/nodejs/node/pull/6994 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Conflicts: src/node.cc
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure b/configure
index d622a6f062..879c12b496 100755
--- a/configure
+++ b/configure
@@ -24,6 +24,10 @@ from gyp.common import GetFlavor
sys.path.insert(0, os.path.join(root_dir, 'tools', 'configure.d'))
import nodedownload
+# imports in tools/
+sys.path.insert(0, os.path.join(root_dir, 'tools'))
+import getmoduleversion
+
# parse our options
parser = optparse.OptionParser()
@@ -420,6 +424,26 @@ parser.add_option('--without-inspector',
dest='without_inspector',
help='disable experimental V8 inspector support')
+parser.add_option('--shared',
+ action='store_true',
+ dest='shared',
+ help='compile shared library for embedding node in another project. ' +
+ '(This mode is not officially supported for regular applications)')
+
+parser.add_option('--without-v8-platform',
+ action='store_true',
+ dest='without_v8_platform',
+ default=False,
+ help='do not initialize v8 platform during node.js startup. ' +
+ '(This mode is not officially supported for regular applications)')
+
+parser.add_option('--without-bundled-v8',
+ action='store_true',
+ dest='without_bundled_v8',
+ default=False,
+ help='do not use V8 includes from the bundled deps folder. ' +
+ '(This mode is not officially supported for regular applications)')
+
(options, args) = parser.parse_args()
# Expand ~ in the install prefix now, it gets written to multiple files.
@@ -810,6 +834,10 @@ def configure_node(o):
o['variables']['node_target_type'] = 'static_library'
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
+ o['variables']['node_shared'] = b(options.shared)
+ o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
+ o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
+ o['variables']['node_module_version'] = int(getmoduleversion.get_version())
if options.linked_module:
o['variables']['library_files'] = options.linked_module