summaryrefslogtreecommitdiff
path: root/tools/install.py
Commit message (Collapse)AuthorAgeFilesLines
* build,test: add proper support for IBM iXu Meng2023-02-221-1/+1
| | | | | | | | | | | Python 3.9 on IBM i now properly returns "os400" for sys.platform instead of claiming to be AIX as it did previously. While the IBM i PASE environment is compatible with AIX, it is a subset and has numerous differences which makes it beneficial to distinguish, however this means that it now needs explicit support here. PR-URL: https://github.com/nodejs/node/pull/46739 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
* build: add --libdir flag to configureStephen Gallagher2022-08-281-2/+2
| | | | | | | | | | This will allow distribution packages to select an alternative location for the unofficial libnode.so. For example, on Fedora it will install into /usr/lib64 on 64-bit systems. Signed-off-by: Stephen Gallagher <sgallagh@redhat.com> PR-URL: https://github.com/nodejs/node/pull/44361 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* tools: support versioned node shared libs on z/OSalexcfyung2022-07-201-0/+33
| | | | | | | | | | | | | | The shared libraries will now be stores in lib.target as opposed to obj.target, libnode.version.so, libnode.x (for npm backwards compat and testing), and libnode.version.x (for builds). The install will also include libnode.so link that points to libnode.version.so (this will be used by native npms for backwards compat). PR-URL: https://github.com/nodejs/node/pull/42256 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com> Co-authored-by: Wayne Zhang <shuowang.zhang@ibm.com>
* build: remove dtrace & etw supportBen Noordhuis2022-07-171-2/+0
| | | | | | | | | | | | | | | | There are no clear indicators anyone is using the dtrace USDT probes. ETW support is very intertwined with the dtrace infrastructure. It's not clear if anyone uses ETW so to keep things simple it too is removed. Fixes: https://github.com/nodejs/node/issues/43649 PR-URL: https://github.com/nodejs/node/pull/43652 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
* build: remove systemtap supportBen Noordhuis2022-07-151-3/+0
| | | | | | | | | | There are no indicators that anyone is actually using this. Quite the opposite: it was broken more than it was working during its lifetime. PR-URL: https://github.com/nodejs/node/pull/43651 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
* build: fix various shared library build issuesWilliam Marlow2022-05-061-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Node.js unofficially supports a shared library variant where the main node executable is a thin wrapper around node.dll/libnode.so. The key benefit of this is to support embedding Node.js in other applications. Since Node.js 12 there have been a number of issues preventing the shared library build from working correctly, primarily on Windows: * A number of functions used executables such as `mksnapshot` are not exported from `libnode.dll` using a `NODE_EXTERN` attribute * A dependency on the `Winmm` system library is missing * Incorrect defines on executable targets leads to `node.exe` claiming to export a number of functions that are actually in `libnode.dll` * Because `node.exe` attempts to export symbols, `node.lib` gets generated causing native extensions to try to link against `node.exe` not `libnode.dll`. * Similarly, because `node.dll` was renamed to `libnode.dll`, native extensions don't know to look for `libnode.lib` rather than `node.lib`. * On macOS an RPATH is added to find `libnode.dylib` relative to `node` in the same folder. This works fine from the `out/Release` folder but not from an installed prefix, where `node` will be in `bin/` and `libnode.dylib` will be in `lib/`. * Similarly on Linux, no RPATH is added so LD_LIBRARY_PATH needs setting correctly for `bin/node` to find `lib/libnode.so`. For the `libnode.lib` vs `node.lib` issue there are two possible options: 1. Ensure `node.lib` from `node.exe` does not get generated, and instead copy `libnode.lib` to `node.lib`. This means addons compiled when referencing the correct `node.lib` file will correctly depend on `libnode.dll`. The down side is that native addons compiled with stock Node.js will still try to resolve symbols against node.exe rather than libnode.dll. 2. After building `libnode.dll`, dump the exports using `dumpbin`, and process this to generate a `node.def` file to be linked into `node.exe` with the `/DEF:node.def` flag. The export entries in `node.def` will all read ``` my_symbol=libnode.my_symbol ``` so that `node.exe` will redirect all exported symbols back to `libnode.dll`. This has the benefit that addons compiled with stock Node.js will load correctly into `node.exe` from a shared library build, but means that every embedding executable also needs to perform this same trick. I went with the first option as it is the cleaner of the two solutions in my opinion. Projects wishing to generate a shared library variant of Node.js can now, for example, ``` .\vcbuild dll package vs ``` to generate a full node installation including `libnode.dll`, `Release\node.lib`, and all the necessary headers. Native addons can then be built against the shared library build easily by specifying the correct `nodedir` option. For example ``` >npx node-gyp configure --nodedir C:\Users\User\node\Release\node-v18.0.0-win-x64 ... >npx node-gyp build ... >dumpbin /dependents build\Release\binding.node Microsoft (R) COFF/PE Dumper Version 14.29.30136.0 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file build\Release\binding.node File Type: DLL Image has the following dependencies: KERNEL32.dll libnode.dll VCRUNTIME140.dll api-ms-win-crt-string-l1-1-0.dll api-ms-win-crt-stdio-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0.dll ... ``` PR-URL: https://github.com/nodejs/node/pull/41850 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Richard Lau <rlau@redhat.com>
* tools: add v8-embedder-state-scope.h to distributed headersMichaël Zasso2022-02-021-0/+1
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/41610 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* build: enable zoslib installation on z/OSalexcfyung2022-01-211-0/+14
| | | | | | | | | | | zoslib is a C/C++ runtime library and an extended implementation of the z/OS LE C Runtime Library. PR-URL: https://github.com/nodejs/node/pull/41493 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com> Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
* build: add `--without-corepack`Jonah Snider2021-12-051-0/+2
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/41060 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* build: include missing V8 headers in distributionMichaël Zasso2021-10-201-0/+5
| | | | | | | | | Fixes: https://github.com/nodejs/Release/issues/704 PR-URL: https://github.com/nodejs/node/pull/40526 Fixes: https://github.com/nodejs/node/issues/40529 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
* build: include new public V8 headers in distributionMichaël Zasso2021-10-131-0/+37
| | | | | | | | | | | | | | v8.h was split into a multitude of smaller headers. Refs: https://github.com/nodejs/node/issues/39876 PR-URL: https://github.com/nodejs/node/pull/40423 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
* deps: add corepackMaël Nison2021-08-251-23/+34
| | | | | | | | | | | | | Corepack provides shims for Yarn and pnpm in order to soften the developer experience when working on Node projects. Refs: https://github.com/nodejs/node/issues/15244 Refs: https://github.com/nodejs/TSC/issues/904 PR-URL: https://github.com/nodejs/node/pull/39608 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* build: restore libplatform headers in distributionJeroen Ooms2021-07-111-0/+3
| | | | | | | | | | | | | Headers considered non-essential were removed in #37570, however the libplatform API is actualy needed (and used) by external software initiaing the v8 engine, see for example: https://chromium.googlesource.com/v8/v8/+/refs/heads/main/samples/hello-world.cc PR-URL: https://github.com/nodejs/node/pull/39288 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* build: include minimal V8 headers in distributionMichaël Zasso2021-03-101-6/+11
| | | | | | | | | | | | | | | | | | | | | | Because Node.js currently distributes all V8 headers, it is not clear which ones are part of our API and ABI compatibility contract. V8 may add, remove, or change headers at any time, preventing us sometimes from updating because the change could affect addons which may depend on them. Moreover, the `cppgc` library, included in V8, is exposed even though it is still in active development and doesn't have a stable API. Node.js should choose exactly which headers are exposed and part of our native API, so that it's easier to reason about changes during V8 updates and to prevent us from automatically increasing the API surface when new headers are added by V8. Instead of specifically excluding v8-inspector, only include `v8.h`, `v8-platform.h` (used in `node.h`) and `v8-profiler.h`. PR-URL: https://github.com/nodejs/node/pull/37570 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
* tools: revise install.py for minor improvementsRich Trott2020-12-271-6/+14
| | | | | | | | | | | | * Use an with block for reading the config file. Refs: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files * Use explicit blank return to make it clear that the return value is not actually used and that it is being used for flow control only.. PR-URL: https://github.com/nodejs/node/pull/36626 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com>
* gyp,build: consistent shared library locationRod Vagg2020-10-141-4/+0
| | | | | | | | | | | Ref: https://github.com/nodejs/node-gyp/issues/2233 Ref: https://github.com/nodejs/gyp-next/pull/69 PR-URL: https://github.com/nodejs/node/pull/35635 Refs: https://github.com/nodejs/gyp-next/releases/tag/v0.6.0 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
* tools: python: ignore instead of select flake8 rulesRefael Ackermann2019-04-131-12/+11
| | | | | PR-URL: https://github.com/nodejs/node/pull/25614 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* build: make install.py python 3 compatiableSakthipriyan Vairamani (thefourtheye)2019-01-231-4/+9
| | | | | | | | | | This patch replaces usage of `filter` in such a way that it will be compatible with Python 3. Also, this patch replaces the usage of `map` to do a side-effect work with normal `for` loop. PR-URL: https://github.com/nodejs/node/pull/25583 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
* tools: prepare tools/install.py for Python 3cclauss2018-12-061-6/+7
| | | | | | PR-URL: https://github.com/nodejs/node/pull/24800 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* src: factor out Node.js-agnostic N-APIsGabriel Schulhof2018-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the Node.js ECMAScript API (N-EAPI?) into its own header and implementation files. The motivation is that the ECMAScript API stand on its own so it might be embedded separately, implementation and all. Portions of the implementation used by both files are stored in `node_api_impl.h`. The checked boxes below indicate that the given API remains in `node_api.h`, whereas the lack of a checkbox indicates that the API was moved to `node_ecma_api.h`. * [x] NAPI_MODULE * [x] NAPI_MODULE_INIT * [x] napi_acquire_threadsafe_function * [x] napi_add_env_cleanup_hook * [x] napi_async_destroy * [x] napi_async_init * [x] napi_call_threadsafe_function * [x] napi_cancel_async_work * [x] napi_close_callback_scope * [x] napi_create_async_work * [x] napi_create_buffer * [x] napi_create_buffer_copy * [x] napi_create_external_buffer * [x] napi_create_threadsafe_function * [x] napi_delete_async_work * [x] napi_fatal_error * [x] napi_fatal_exception * [x] napi_get_buffer_info * [x] napi_get_node_version * [x] napi_get_threadsafe_function_context * [x] napi_get_uv_event_loop * [x] napi_is_buffer * [x] napi_make_callback * [x] napi_module_register * [x] napi_open_callback_scope * [x] napi_queue_async_work * [x] napi_ref_threadsafe_function * [x] napi_release_threadsafe_function * [x] napi_remove_env_cleanup_hook * [x] napi_unref_threadsafe_function * [ ] napi_add_finalizer * [ ] napi_adjust_external_memory * [ ] napi_call_function * [ ] napi_close_escapable_handle_scope * [ ] napi_close_handle_scope * [ ] napi_coerce_to_bool * [ ] napi_coerce_to_number * [ ] napi_coerce_to_object * [ ] napi_coerce_to_string * [ ] napi_create_array * [ ] napi_create_arraybuffer * [ ] napi_create_array_with_length * [ ] napi_create_bigint_int64 * [ ] napi_create_bigint_uint64 * [ ] napi_create_bigint_words * [ ] napi_create_dataview * [ ] napi_create_double * [ ] napi_create_error * [ ] napi_create_external * [ ] napi_create_external_arraybuffer * [ ] napi_create_function * [ ] napi_create_int32 * [ ] napi_create_int64 * [ ] napi_create_object * [ ] napi_create_promise * [ ] napi_create_range_error * [ ] napi_create_reference * [ ] napi_create_string_latin1 * [ ] napi_create_string_utf16 * [ ] napi_create_string_utf8 * [ ] napi_create_symbol * [ ] napi_create_typedarray * [ ] napi_create_type_error * [ ] napi_create_uint32 * [ ] napi_define_class * [ ] napi_define_properties * [ ] napi_delete_element * [ ] napi_delete_property * [ ] napi_delete_reference * [ ] napi_escape_handle * [ ] napi_get_and_clear_last_exception * [ ] napi_get_arraybuffer_info * [ ] napi_get_array_length * [ ] napi_get_boolean * [ ] napi_get_cb_info * [ ] napi_get_dataview_info * [ ] napi_get_element * [ ] napi_get_global * [ ] napi_get_last_error_info * [ ] napi_get_named_property * [ ] napi_get_new_target * [ ] napi_get_null * [ ] napi_get_property * [ ] napi_get_property_names * [ ] napi_get_prototype * [ ] napi_get_reference_value * [ ] napi_get_typedarray_info * [ ] napi_get_undefined * [ ] napi_get_value_bigint_int64 * [ ] napi_get_value_bigint_uint64 * [ ] napi_get_value_bigint_words * [ ] napi_get_value_bool * [ ] napi_get_value_double * [ ] napi_get_value_external * [ ] napi_get_value_int32 * [ ] napi_get_value_int64 * [ ] napi_get_value_string_latin1 * [ ] napi_get_value_string_utf16 * [ ] napi_get_value_string_utf8 * [ ] napi_get_value_uint32 * [ ] napi_get_version * [ ] napi_has_element * [ ] napi_has_named_property * [ ] napi_has_own_property * [ ] napi_has_property * [ ] napi_instanceof * [ ] napi_is_array * [ ] napi_is_arraybuffer * [ ] napi_is_dataview * [ ] napi_is_error * [ ] napi_is_exception_pending * [ ] napi_is_promise * [ ] napi_is_typedarray * [ ] napi_new_instance * [ ] napi_open_escapable_handle_scope * [ ] napi_open_handle_scope * [ ] napi_reference_ref * [ ] napi_reference_unref * [ ] napi_reject_deferred * [ ] napi_remove_wrap * [ ] napi_resolve_deferred * [ ] napi_run_script * [ ] napi_set_element * [ ] napi_set_named_property * [ ] napi_set_property * [ ] napi_strict_equals * [ ] napi_throw * [ ] napi_throw_error * [ ] napi_throw_range_error * [ ] napi_throw_type_error * [ ] napi_typeof * [ ] napi_unwrap * [ ] napi_wrap PR-URL: https://github.com/nodejs/node/pull/23786 Reviewed-By: Yazhong Liu <yorkiefixer@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* tools: remove lldbinit file from install scriptClemens Hammacher2018-09-071-1/+0
| | | | | | | | | | | | V8 removed the lldbinit file. Refs: https://crrev.com/c/1127892 PR-URL: https://github.com/nodejs/node/pull/21983 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* build: do not copy v8-inspector* headers ar part of installAlexey Kozyatinskiy2018-08-311-1/+9
| | | | | | | | | | | | These headers are exposed from V8 for embedder and should not be used by native addons. Fixes https://github.com/nodejs/node/issues/22415 PR-URL: https://github.com/nodejs/node/pull/22586 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* tools: properly convert .gypi in install.pyMichael Achenbach2018-07-191-4/+2
| | | | | It was breaking during install when .gypi strings had quotes in them. e.g.: 'foo': 'bar="baz"'
* tools: install all header files OpenSSL-1.1.0Shigeki Ohtsu2018-04-101-1/+1
| | | | | | | | | | | | After upgrading OpenSSL-1.1.0, header files depends on architectures were changed. This fixes to copy all `deps/openssl/config/*.h' into the install directory. Fixes: https://github.com/nodejs/node/issues/4270 PR-URL: https://github.com/nodejs/node/pull/19794 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* build: fix npm install with --sharedBen Noordhuis2017-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The npm install rules had a hidden dependency on the `node` binary install rule creating the `$PREFIX/bin` directory. Because with `./configure --shared` no binary is created, the rule subsequently failed. Fix that by creating the directory before creating the symlinks to the npm and npx scripts. (Whether it makes sense to install npm without a `node` binary is a separate question. This commit is not taking positions. :-)) Regression introduced in commit ed8c89a ("build: fix shared installing target") which, as the commit log indicates, was itself a bug fix for the `./configure --shared` install. PR-URL: https://github.com/nodejs/node/pull/16438 Fixes: https://github.com/nodejs/node/issues/16437 Ref: https://github.com/nodejs/node/pull/15148 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* build: fix shared installing targetYorkie Liu2017-09-281-1/+4
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/15148 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* build: add npx to installersKat Marchán2017-07-171-0/+9
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/14235 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* deps: backport ec1ffe3 from upstream V8Daniel Bevenius2017-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds lldbinit files from upstream V8 and also adds these so that they get installed when `make install` is run. Original commit message: [tools] add lldbinit The goal of this commit is to add the equivalent to gdbinit but for lldb. I've tried to replicate the commands as close as possible but I'm unsure about the jss command and hoping to get some feedback on it in addition to the bta command which I'm not sure how/when this could be used. This is probably just inexperience on my part. The lldbinit file can be placed into a directory prefixed with dot (.lldbinit) and the python script is currently expected to be in the same directory. The path to the script can be changed manually if needed as well. NOTRY=true Review-Url: https://codereview.chromium.org/2758373002 Cr-Commit-Position: refs/heads/master@{#44136} PR-URL: https://github.com/nodejs/node/pull/12061 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* n-api: add support for abi stable module APIJason Ginchereau2017-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for abi stable module API (N-API) as "Experimental feature". The goal of this API is to provide a stable Node API for native module developers. N-API aims to provide ABI compatibility guarantees across different Node versions and also across different Node VMs - allowing N-API enabled native modules to just work across different versions and flavors of Node.js without recompilation. A more detailed introduction is provided in: https://github.com/nodejs/node-eps/blob/master/005-ABI-Stable-Module-API.md and https://github.com/nodejs/abi-stable-node/blob/doc/VM%20Summit.pdf. The feature, during its experimental state, will be guarded by a runtime flag "--napi-modules". Only when this flag is added to the command line will N-API modules along with regular non N-API modules be supported. The API is defined by the methods in "src/node_api.h" and "src/node_api_types.h". This is the best starting point to review the API surface. More documentation will follow. In addition to the implementation of the API using V8, which is included in this PR, the API has also been validated against chakracore and that port is available in https://github.com/nodejs/abi-stable-node/tree/api-prototype-chakracore-8.x. The current plan is to provide N-API support in versions 8.X and 6.X directly. For older versions, such as 4.X or pre N-API versions of 6.X, we plan to create an external npm module to provide a migration path that will allow modules targeting older Node.js versions to use the API, albeit without getting the advantage of not having to recompile. In addition, we also plan an external npm package with C++ sugar to simplify the use of the API. The sugar will be in-line only and will only use the exported N-API methods but is not part of the N-API itself. The current version is in: https://github.com/nodejs/node-api. This PR is a result of work in the abi-stable-node repo: https://github.com/nodejs/abi-stable-node/tree/doc, with this PR being the cumulative work on the api-prototype-8.x branch with the following contributors in alphabetical order: Author: Arunesh Chandra <arunesh.chandra@microsoft.com> Author: Gabriel Schulhof <gabriel.schulhof@intel.com> Author: Hitesh Kanwathirtha <hiteshk@microsoft.com> Author: Ian Halliday <ianhall@microsoft.com> Author: Jason Ginchereau <jasongin@microsoft.com> Author: Michael Dawson <michael_dawson@ca.ibm.com> Author: Sampson Gao <sampsong@ca.ibm.com> Author: Taylor Woll <taylor.woll@microsoft.com> PR-URL: https://github.com/nodejs/node/pull/11975 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* build: remove cares headers from tarballGibson Fahnestock2017-03-221-3/+0
| | | | | | | | | | | | The bundled c-ares isn't very suitable for consumption by addons, isn't kept stable, and isn't exported on windows. PR-URL: https://github.com/nodejs/node/pull/10283 Refs: https://github.com/nodejs/node-gyp/pull/1055 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* build: add node_use_openssl check to install.pyDaniel Bevenius2017-03-131-1/+2
| | | | | | | | | | | | | | When configuring --without-ssl and then running make install openssl headers will be copied from deps/openssl to the target installation directory. This commit adds a check for is node_use_openssl is set in which case the headers are not copied. PR-URL: https://github.com/nodejs/node/pull/11766 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brian White <mscdex@mscdex.net>
* build: add correct shared library naming on OS XStewart Addison2016-08-091-4/+5
| | | | | | | | | | | | | The build system currently creates a shared library on OS X with the same name as on Linux i.e. libnode.so.48. This is inconsistent with the conventions on OS X which uses libnode.48.so This commit changes the build process and install.py (used by make binary) to build with the correct name on OS X when the --shared configure parameter is used. PR-URL: https://github.com/nodejs/node/pull/7687 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* build: configure --sharedStefan Budeanu2016-06-281-2/+16
| | | | | | | | | | | | | 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>
* installer: don't install node_internals.hBen Noordhuis2016-05-221-1/+0
| | | | | | | | | | | | | | | | As the name suggests, it's for internal use only, so don't install it. Including it in an add-on doesn't work because the file depends on other header files that are not installed. Adding it to the install list appears to have been an oversight in commit 32478acf ("build: unix install node and dep library headers"). PR-URL: https://github.com/nodejs/node/pull/6913 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
* tools: remove simplejson dependencySakthipriyan Vairamani2016-04-121-6/+1
| | | | | | | | | | | | As Node.js expects either Python 2.6 or 2.7 installed to work properly, simplejson module is no longer necessary. It was included in Python 2.6 as the json module. PR-URL: https://github.com/nodejs/node/pull/6101 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
* tools: do not rewrite npm shebang in install.pyEvan Lucas2016-04-081-16/+0
| | | | | | | | | | | | | | Rewriting npm shebang in install.py violates user expectations among other things. The shebang in npm.js is kept as #!/usr/bin/env node. Fixes: https://github.com/nodejs/node/issues/6095 PR-URL: https://github.com/nodejs/node/pull/6098 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
* deps: reintroduce supporting shared c-ares buildsJohan Bergström2016-04-051-1/+3
| | | | | | | | | | | | | | | As of cc192f0e we've now in sync with upstream which means that we also can allow our users to build against a shared version of c-ares. Note: It is still up to users to make sure that the library version is on par with what Node.js bundles. This "reverts" commit 25fa5c4. PR-URL: https://github.com/nodejs/node/pull/5775 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* tools: remove unused importsSakthipriyan Vairamani2016-03-181-1/+0
| | | | | | PR-URL: https://github.com/nodejs/node/pull/5765 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* tools: add --prof-process flag to node binaryMatt Loring2015-12-081-44/+0
| | | | | | | | | | | This change cleans up outstanding comments on #3032. It improves error handling when no isolate file is provided and adds the --prof-process flag to the node binary which executes the tick processor on the provided isolate file. PR-URL: https://github.com/nodejs/node/pull/4021 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com>
* installer: install the tick processorMatt Loring2015-11-251-0/+45
| | | | | | | | | | The tick processor is used to provide readable profiling information from isolate tick logs (produced by a call to node -prof). This patch installs the file at $PREFIX/share/doc/node/tick-processor. PR-URL: https://github.com/nodejs/node/pull/3032 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* build: Updates for AIX npm support - part 1Michael Dawson2015-10-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR is the first step enabling support for native modules for AIX. The main issue is that unlike linux where all symbols within the Node executable are available to the shared library for a native module (npm), on AIX the symbols must be explicitly exported. In addition, when the shared library is built it must be linked using a list of the available symbols. This patch covers the changes need to: 1) Export the symbols when building the node executable 2) Generate the file listing the symbols that can be used when building the shared library. For AIX, it breaks the build process into 2 steps. The first builds a static library and then generates a node.exp file which contains the symbols from that library. The second builds the node executable and uses the node.exp file to specify which symbols should be exported. In addition, it save the node.exp file so that it can later be used in the creation of the shared library when building a native module. The following additional steps will be required in dependent projects to fully enable AIX for native modules and are being worked separately: - Updates to node-gyp to use node.exp when creating the shared library for a native module - Fixes to gyp related to copying files as covered in https://codereview.chromium.org/1368133002/patch/1/10001 - Pulling in updated gyp versions to Node and node-gyp - Pulling latest libuv These changes were done to minimize the change to other platforms by working within the existing structure to add the 2 step process for AIX without changing the process for other platforms. PR-URL: https://github.com/nodejs/node/pull/3114 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* installer: fix installers for node.js renameFrederic Hemberger2015-08-231-11/+0
| | | | | | | | | | | This commit completes the io.js to Node.js rename in the Windows installer. Fixes: https://github.com/nodejs/node/issues/2418 PR-URL: https://github.com/nodejs/node/pull/2367 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
* node: rename from io.js to nodecjihrig2015-08-231-6/+6
| | | | | | | | | | | This commit replaces instances of io.js with Node.js, based on the recent convergence. There are some remaining instances of io.js, related to build and the installer. Fixes: https://github.com/nodejs/node/issues/2361 PR-URL: https://github.com/nodejs/node/pull/2367 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
* deps: update v8 to 4.4.63.9Ben Noordhuis2015-08-041-1/+0
| | | | | | | | | | | | | | | | | | | | Upgrade the bundled V8 and update code in src/ and lib/ to the new API. Notable backwards incompatible changes are the removal of the smalloc module and dropped support for CESU-8 decoding. CESU-8 support can be brought back if necessary by doing UTF-8 decoding ourselves. This commit includes https://codereview.chromium.org/1192973004 to fix a build error on python 2.6 systems. The original commit log follows: Use optparse in js2c.py for python compatibility Without this change, V8 won't build on RHEL/CentOS 6 because the distro python is too old to know about the argparse module. PR-URL: https://github.com/nodejs/io.js/pull/2022 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* tools: install gdbinit from v8 to $PREFIX/shareAli Ijaz Sheikh2015-07-071-0/+2
| | | | | | | | | | | gdbinit provided by V8 can be very useful for low-level debugging of crashes in node and in binary addons. Most useful commands at 'jst' for JS stack traces and 'job' for printing a heap object. This patch installs the file at $PREFIX/share/doc/node/gdbinit. Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/nodejs/io.js/pull/2123
* build: add tar-headers target for headers-only tarRod Vagg2015-06-251-3/+11
| | | | | | | | | to replace the full src download by node-gyp, using the proper format instead of the full source format PR-URL: https://github.com/nodejs/io.js/pull/1975 Reviewed-By: William Blankenship <william.jblankenship@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
* install: fix NameErrorthefourtheye2015-05-071-2/+2
| | | | | | | | | | | If `len(args)` is less than two, then `install_path = dst_dir + node_prefix + '/'` would throw a `NameError`, because `dst_dir` will not be defined yet. So we are assigning `''` as the default value. PR-URL: https://github.com/iojs/io.js/pull/1628 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* tools: add to install deps/openssl/config/archsShigeki Ohtsu2015-04-101-0/+1
| | | | | | PR-URL: https://github.com/iojs/io.js/pull/1377 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* build: Remove building against a shared V8Johan Bergström2015-04-071-2/+1
| | | | | | | | This action is to encourage packagers to not build against a shared V8 library since even minor bumps of V8 can create issues. PR-URL: https://github.com/iojs/io.js/pull/1331 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* tools: fix install source path for openssl headersOguz Bastemur2015-04-061-1/+1
| | | | | | | | | | | This part is broken for a very long time. We noticed the problem while using jxcore native interface with embedded openssl. I've also sent a pull request to node.js repo. The problem may affect a native addon using builtin openssl. `opensslconf.h` is overwritten with `deps/openssl/conf/opensslconf.h` PR-URL: https://github.com/iojs/io.js/pull/1354 Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>