diff options
author | Fedor Indutny <fedor@indutny.com> | 2016-03-22 21:05:54 -0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2016-03-25 21:02:18 -0400 |
commit | 8363ede8551b7c30293901f79ea8204680bc9757 (patch) | |
tree | ac3493855b1f6c03f7eb339d0f1e04bf3d012a87 /configure | |
parent | 53a95a5b12fbbfc8d465689e43aa77da32e5d0f3 (diff) | |
download | node-new-8363ede8551b7c30293901f79ea8204680bc9757.tar.gz |
node: --no-browser-globals configure flag
Introduce `--no-browser-globals` configure flag. With this flag set, following
globals won't be exported:
- `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval`,
`setImmediate`, `clearImmediate`
- `console`
These are provided by the DOM implementation in browser, so the
`--no-browser-globals` flag may be helpful when embedding node.js within
chromium/webkit.
Inspired-By: https://github.com/atom/node/commit/82e10ce94f3c90234dac187f04a47d4d357ffd31
PR-URL: https://github.com/nodejs/node/pull/5853
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -373,6 +373,12 @@ parser.add_option('--enable-static', dest='enable_static', help='build as static library') +parser.add_option('--no-browser-globals', + action='store_true', + dest='no_browser_globals', + help='do not export browser globals like setTimeout, console, etc. ' + + '(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. @@ -762,6 +768,8 @@ def configure_node(o): if options.enable_static: o['variables']['node_target_type'] = 'static_library' + o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) + if options.linked_module: o['variables']['library_files'] = options.linked_module |