summaryrefslogtreecommitdiff
path: root/node.gyp
Commit message (Collapse)AuthorAgeFilesLines
* win: bring back xp/2k3 supportBert Belder2015-05-221-3/+0
| | | | | | | | | | | | | | | | | | | Issue: https://github.com/joyent/node/issues/25348 The gyp/project files don't explicitly specify a subsystem version, which results in the default being used. The default changed from VS 2010 to VS 2012 and later. Backport e8d08503c7821e8c92e9fa236ed7328e9bdfe62a from io.js. Original commit message follows: Chrome still runs on Windows XP, so there is no reason that iojs couldn't. PR: https://github.com/iojs/io.js/pull/512 (cherry picked from commit e8d08503c7821e8c92e9fa236ed7328e9bdfe62a) Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/25367
* src: make build pass with GCC < 4.5Julien Gilli2015-01-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Building node with GCC > 4.4 on CentOS makes the node binary depend on a more recent version of the C/C++ runtime that is not installed by default on these older CentOS platforms, and probably on other platforms as well. Building node with the default gcc and g++ compilers that come with these older versions of CentOS allows to ship a node binary that runs out of the box on these setups with older C/C++ runtimes. This change works around a bug that was fixed in GCC 4.5. Versions of GCC < 4.5 would not support using the injected-class-name of a template base class as a type name. This change also disables aliasing optimizations for toolchains using GCC <= 4.4 as they're not able to deal with the aliasing in the queue implementation used by libuv and node (see src/queue.h). Fixes #9079. PR: #9098 PR-URL: https://github.com/joyent/node/pull/9098 Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* build: do not generate support for libuv's probesJulien Gilli2014-12-091-16/+3
| | | | | | | | | | | Dtrace probes were removed from libuv recently, but their usage by node was not completely removed, causing build breaks on SmartOS. Even though the build is working on other platforms, these probes are not fired by libuv anymore, so there's no point in using them on these platforms too. Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* async-wrap: move MakeCallback to .ccTrevor Norris2014-12-051-0/+1
| | | | | | | | | | | | MakeCallback is too large a function to be inlined. Likewise, only having header files will not allow for any part of AsyncWrap to be exposed cleanly via NODE_MODULE_CONTEXT_AWARE_BUILTIN(). PR-URL: https://github.com/joyent/node/pull/8110 Signed-off-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com> Reviewed-by: Alexis Campailla <alexis@janeasystems.com> Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
* src: remove Async ListenerTrevor Norris2014-12-051-1/+0
| | | | | | | | | | | | Async Listener was the name of the user-facing JS API, and is being completely removed. Instead low level hooks directly into the mechanism that AL used will be introduced in a future commit. PR-URL: https://github.com/joyent/node/pull/8110 Signed-off-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com> Reviewed-by: Alexis Campailla <alexis@janeasystems.com> Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
* deps: re-implement debugger-agentFedor Indutny2014-10-081-0/+2
| | | | | Reviewed-By: Trevor Norris <trevnorris@gmail.com> PR-URL: https://github.com/joyent/node/pull/8476
* build, i18n: improve Intl build, add "--with-intl"Steven R. Loomis2014-10-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two main goals of this change are: - To make it easier to build the Intl option using ICU (particularly, using a newer ICU than v8/Chromium's version) - To enable a much smaller ICU build with only English support The goal here is to get node.js binaries built this way by default so that the Intl API can be used. Additional data can be added at execution time (see Readme and wiki) More details are at https://github.com/joyent/node/pull/7719 In particular, this change adds the "--with-intl=" configure option to provide more ways of building "Intl": - "full-icu" picks up an ICU from deps/icu - "small-icu" is similar, but builds only English - "system-icu" uses pkg-config to find an installed ICU - "none" does nothing (no Intl) For Windows builds, the "full-icu" or "small-icu" options are added to vcbuild.bat. Note that the existing "--with-icu-path" option is not removed from configure, but may not be used alongside the new option. Wiki changes have already been made on https://github.com/joyent/node/wiki/Installation and a new page created at https://github.com/joyent/node/wiki/Intl (marked as provisional until this change lands.) Summary of changes: * README.md : doc updates * .gitignore : added "deps/icu" as this is the location where ICU is unpacked to. * Makefile : added the tools/icu/* files to cpplint, but excluded a problematic file. * configure : added the "--with-intl" option mentioned above. Calculate at config time the list of ICU source files to use and data packaging options. * node.gyp : add the new files src/node_i18n.cc/.h as well as ICU linkage. * src/node.cc : add call into node::i18n::InitializeICUDirectory(icu_data_dir) as well as new --icu-data-dir option and NODE_ICU_DATA env variable to configure ICU data loading. This loading is only relevant in the "small" configuration. * src/node_i18n.cc : new source file for the above Initialize.. function, to setup ICU as needed. * tools/icu : new directory with some tools needed for this build. * tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new ways, both on unix/mac and windows. * tools/icu/icu-system.gyp : new .gyp file to build node against a pkg-config detected ICU. * tools/icu/icu_small.json : new config file for the "English-only" small build. * tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the above .json file. * tools/icu/iculslocs.cc : new tool for repairing ICU data manifests after trim operation. * tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker. * vcbuild.bat : added small-icu and full-icu options, to call into configure. * Fixed toolset dependencies, see https://github.com/joyent/node/pull/7719#issuecomment-54641687 Note that because of a bug in gyp {CC,CXX}_host must also be set. Otherwise gcc/g++ will be used by default for part of the build. Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com>
* win: manifest node.exe for Windows 8.1Alexis Campailla2014-09-171-0/+4
| | | | | | | | | | Adding a compatibility section to node.exe embedded manifest so that Node is declared explicitly compatible with Windows 8.1. Required so that os.release() can return the correct version on Windows 8.1. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* gyp: preserve v8dbg syms on freebsd tooFedor Indutny2014-08-171-2/+2
|
* build: linking CoreFoundation framework for OSXThorsten Lorenz2014-08-081-0/+3
| | | | | | | | | | Linking CoreFoundation for OSX is needed for OSX debugging features to function properly. For instance Instruments cannot record Heap Allocations if the CoreFoundation is not linked. Reviewed-By: Fedor Indutny <fedor@indutny.com>
* Merge remote-tracking branch 'upstream/v0.10' into v0.12Timothy J Fontaine2014-08-071-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog Makefile deps/uv/ChangeLog deps/uv/build.mk deps/uv/src/unix/darwin.c deps/uv/src/unix/getaddrinfo.c deps/uv/src/version.c deps/v8/src/checks.h deps/v8/src/isolate.h lib/cluster.js lib/module.js lib/timers.js lib/tls.js src/node_version.h
| * gyp: do not rm unused openssl syms on osx/linuxFedor Indutny2014-07-311-0/+13
| | | | | | | | | | | | fix #8026 Reviewed-By: Fedor Indutny <fedor@indutny.com>
* | Merge remote-tracking branch 'origin/v0.10' into masterFedor Indutny2014-07-291-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/api/buffer.markdown lib/_stream_readable.js lib/assert.js lib/buffer.js lib/child_process.js lib/http.js lib/string_decoder.js lib/zlib.js node.gyp test/simple/test-buffer.js test/simple/test-https-foafssl.js test/simple/test-stream2-compatibility.js test/simple/test-tls-server-verify.js
| * test: fix test-tls-server-verifyFedor Indutny2014-07-231-1/+6
| | | | | | | | fix #7963
| * gyp: do not let `v8dbg_` slip away on osxFedor Indutny2014-07-171-0/+8
| | | | | | | | | | Pass `-force_load` to linker when linking to `libv8_base` to preserve `v8dbg_` symbols, which are useful for debugging.
* | gyp: fix post-mortem in v0.11Fedor Indutny2014-07-231-0/+5
| | | | | | | | Expose missing constants and keep symbols on OSX.
* | contextify: remove useless header fileFedor Indutny2014-07-081-1/+0
| | | | | | | | fix #7910
* | Merge remote-tracking branch 'upstream/v0.10'Timothy J Fontaine2014-06-101-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: AUTHORS ChangeLog deps/v8/src/api.cc deps/v8/src/unicode-inl.h deps/v8/src/unicode.h lib/_stream_readable.js lib/http.js src/cares_wrap.cc src/node.cc src/node_crypto.cc src/node_dtrace.cc src/node_file.cc src/node_stat_watcher.cc src/node_version.h src/process_wrap.cc src/string_bytes.cc src/string_bytes.h src/udp_wrap.cc src/util.h test/simple/test-buffer.js test/simple/test-stream2-compatibility.js
| * build: fix g++ 4.8 build, disable -WerrorBen Noordhuis2014-03-231-3/+0
| | | | | | | | | | | | | | | | | | Turn off -Werror when building V8, it hits -Werror=unused-local-typedefs with g++ 4.8. The warning itself is harmless so don't abort the build. This was originally implemented in commit d2ab314e back in 2011 but the build process has gone through a few iterations since then, that change no longer works.
* | configure: make --v8-options switch more robustBen Noordhuis2014-04-011-1/+1
| | | | | | | | | | | | | | Improve on commit b55c9d6 by not requiring that switches are comma separated. This commit makes `./configure --v8-options="--foo --bar"` work and takes special care to properly escape quotes in the options string.
* | crypto: move `createCredentials` to tlsFedor Indutny2014-03-291-0/+1
| | | | | | | | | | | | | | | | Move `createCredentials` to `tls` module and rename it to `createSecureContext`. Make it use default values from `tls` module: `DEFAULT_CIPHERS` and `DEFAULT_ECDH_CURVE`. fix #7249
* | configure: --v8-options optionFedor Indutny2014-03-291-0/+2
| | | | | | | | | | Introduce a way to set some v8 flags at compile time, the values should be separated by comma.
* | Merge remote-tracking branch 'origin/v0.10'Fedor Indutny2014-03-021-2/+32
|\ \ | |/ | | | | | | | | | | | | Conflicts: configure lib/_stream_readable.js lib/http.js src/node_dtrace.cc
| * gyp: specialize node.d for freebsdFedor Indutny2014-02-211-2/+32
| | | | | | | | | | `node.d` should use `psinfo.d` instead of `procfs.d` and have statically defined architecture on FreeBSD.
* | bindings: add spawn_sync bindingsBert Belder2014-02-101-0/+1
| | | | | | | | | | This implements a nested event loop that makes it possible to control a child process, while blocking the main loop until the process exits.
* | src: add tracing.v8.on('gc') statistics hooksBen Noordhuis2014-02-051-0/+2
| | | | | | | | | | | | | | Add a new 'tracing' module with a v8 property that lets the user register listeners for gc events. The listeners are invoked after every garbage collection cycle with 'before' and 'after' statistics. Useful for monitoring tools that want to keep track of memory usage.
* | node: register modules from DSO constructorsKeith M Wesolowski2014-01-271-2/+0
| | | | | | | | | | | | | | Built-in modules should be automatically registered, replacing the static module list. Add-on modules should also be automatically registered via DSO constructors. This improves flexibility in adding built-in modules and is also a prerequisite to pure-C addon modules.
* | Merge remote-tracking branch 'upstream/v0.10'Timothy J Fontaine2014-01-241-6/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: AUTHORS ChangeLog deps/uv/AUTHORS deps/uv/ChangeLog deps/uv/src/unix/process.c deps/uv/src/version.c lib/net.js node.gyp src/node_version.h
| * gyp: fix `ninja` build on linuxFedor Indutny2014-01-161-5/+5
| | | | | | | | fix #6679
* | build: unconditionally disable -WerrorBen Noordhuis2014-01-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | Forcibly disable -Werror, the old { 'werror': '' } hack in node.gyp no longer works with newer versions of V8. We support a wide range of compilers, it's simply not feasible to squelch all warnings, never mind that the libraries in deps/ are not under our control. Fixes #6817.
* | gyp: build openssl-cli tool and use it in testsFedor Indutny2013-12-111-1/+6
| | | | | | | | fix #6663
* | Merge branch 'v0.10'Fedor Indutny2013-12-101-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: lib/tls.js src/node_crypto.cc src/node_crypto.h
| * build: only whole archive on static v8 buildsTimothy J Fontaine2013-12-101-1/+1
| | | | | | | | Closes #6629
* | Merge remote-tracking branch 'upstream/v0.10'Timothy J Fontaine2013-12-011-0/+6
|\ \ | |/ | | | | | | Conflicts: src/stream_wrap.cc
| * build: include postmortem symbols on linuxTimothy J Fontaine2013-12-011-0/+6
| | | | | | | | | | | | Previously we were building the symbols, but the linker was garbage collecting the symbols because they weren't used. Inform the linker that we want to keep all symbols from v8 around.
* | base-object: add BaseObjectTrevor Norris2013-11-121-2/+2
| | | | | | | | | | | | | | | | BaseObject is a class that just handles the Persistent handle attached to the class instance. This also removed WeakObject. Reordering the inheritance chain helps prevent unneeded calls on instances that don't call MakeCallback.
* | node: add AsyncListener supportTrevor Norris2013-10-311-0/+2
| | | | | | | | | | | | | | | | | | AsyncListener is a JS API that works in tandem with the AsyncWrap class to allow the user to be alerted to key events in the life cycle of an asynchronous event. The AsyncWrap class has its own MakeCallback implementation that core will be migrated to use, and uses state sharing techniques to allow quicker communication between JS and C++ whether the async event callbacks need to be called.
* | build: use zero overhead systemtap probesBen Noordhuis2013-10-291-25/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling suggested that on Linux sometimes over 10% of CPU time was being spent inside the systemtap probe entry points in the binding layer, even when the process was not actively being traced with the `stap` tool. That's why this commit makes it possible to use the *_ENABLED() macros and bail out early when we're not being traced, reducing the overhead of unused probes to (almost) zero. Said macros were already being generated by `dtrace -h` but were not usable because they rely on external definitions. To remedy that, we now generate the accompanying object files with `dtrace -G`. This commit includes a change to libuv that has been landed upstream in commit joyent/libuv@3c172ea.
* | src: remove ObjectWrap dependency from coreBen Noordhuis2013-09-251-0/+2
| | | | | | | | | | | | | | | | Drop the ObjectWrap dependency in favor of an internal WeakObject class. Let's us stop worrying about API and ABI compatibility when making changes to the way node.js deals with weakly persistent handles internally.
* | src: add multi-context supportBen Noordhuis2013-09-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes it possible to use multiple V8 execution contexts within a single event loop. Put another way, handle and request wrap objects now "remember" the context they belong to and switch back to that context when the time comes to call into JS land. This could have been done in a quick and hacky way by calling v8::Object::GetCreationContext() on the wrap object right before making a callback but that leaves a fairly wide margin for bugs. Instead, we make the context explicit through a new Environment class that encapsulates everything (or almost everything) that belongs to the context. Variables that used to be a static or a global are now members of the aforementioned class. An additional benefit is that this approach should make it relatively straightforward to add full isolate support in due course. There is no JavaScript API yet but that will be added in the near future. This work was graciously sponsored by GitHub, Inc.
* | build: remove unused Carbon dependencyBen Noordhuis2013-09-041-1/+0
| | | | | | | | | | Libuv as of joyent/libuv@d48168a no longer has link-time dependencies on the Carbon framework or any other frameworks.
* | src: remove pointless node_os.h header fileBen Noordhuis2013-08-261-1/+0
| | | | | | | | src/node_os.cc doesn't export anything that's used elsewhere. Remove it.
* | vm, core, module: re-do vm to fix known issuesDomenic Denicola2013-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As documented in #3042 and in [1], the existing vm implementation has many problems. All of these are solved by @brianmcd's [contextify][2] package. This commit uses contextify as a conceptual base and its code core to overhaul the vm module and fix its many edge cases and caveats. Functionally, this fixes #3042. In particular: - A context is now indistinguishable from the object it is based on (the "sandbox"). A context is simply a sandbox that has been marked by the vm module, via `vm.createContext`, with special internal information that allows scripts to be run inside of it. - Consequently, items added to the context from anywhere are immediately visible to all code that can access that context, both inside and outside the virtual machine. This commit also smooths over the API very slightly: - Parameter defaults are now uniformly triggered via `undefined`, per ES6 semantics and previous discussion at [3]. - Several undocumented and problematic features have been removed, e.g. the conflation of `vm.Script` with `vm` itself, and the fact that `Script` instances also had all static `vm` methods. The API is now exactly as documented (although arguably the existence of the `vm.Script` export is not yet documented, just the `Script` class itself). In terms of implementation, this replaces node_script.cc with node_contextify.cc, which is derived originally from [4] (see [5]) but has since undergone extensive modifications and iterations to expose the most useful C++ API and use the coding conventions and utilities of Node core. The bindings exposed by `process.binding('contextify')` (node_contextify.cc) replace those formerly exposed by `process.binding('evals')` (node_script.cc). They are: - ContextifyScript(code, [filename]), with methods: - runInThisContext() - runInContext(sandbox, [timeout]) - makeContext(sandbox) From this, the vm.js file builds the entire documented vm module API. node.js and module.js were modified to use this new native binding, or the vm module itself where possible. This introduces an extra line or two into the stack traces of module compilation (and thus into most stack traces), explaining the changed tests. The tests were also updated slightly, with all vm-related simple tests consolidated as test/simple/test-vm-* (some of them were formerly test/simple/test-script-*). At the same time they switched from `common.debug` to `console.error` and were updated to use `assert.throws` instead of rolling their own error-testing methods. New tests were also added, of course, demonstrating the new capabilities and fixes. [1]: http://nodejs.org/docs/v0.10.16/api/vm.html#vm_caveats [2]: https://github.com/brianmcd/contextify [3]: https://github.com/joyent/node/issues/5323#issuecomment-20250726 [4]: https://github.com/kkoopa/contextify/blob/bf123f3ef960f0943d1e30bda02e3163a004e964/src/contextify.cc [5]: https://gist.github.com/domenic/6068120
* | tls_wrap: DRY ClientHelloParserFedor Indutny2013-08-061-0/+2
| | | | | | | | | | | | Share ClientHelloParser code between `tls_wrap.cc` and `node_crypto.cc`. fix #5959
* | build: fix ia32 sunos, elfwrap only needs -64Timothy J Fontaine2013-08-051-1/+1
| |
* | build: embed the mdb_v8.so into the binaryTimothy J Fontaine2013-08-051-0/+34
| | | | | | | | | | This builds and includes the mdb_v8.so in the binary of node so mdb can be sure to always use the latest version
* | src: Replace macros with util functionsisaacs2013-08-011-1/+0
| |
* | src: don't use NewExternal() with unaligned stringsBen Noordhuis2013-07-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | V8 3.20.9 enforces that external pointers are aligned on a two-byte boundary. We cannot portably guarantee that for the source code strings that tools/js2c.py generates so simply stop using String::NewExternal() altogether (and by extension String::ExternalAsciiStringResource). Fixes the following run-time assert: FATAL ERROR: v8::String::NewExternal() Pointer is not aligned
* | lib: macro-ify type checksBen Noordhuis2013-07-241-0/+1
| | | | | | | | | | Increases the grep factor. Makes it easier to harmonize type checks across the code base.
* | src: rename macros.py to notrace_macros.pyBen Noordhuis2013-07-241-9/+8
| | | | | | | | | | | | This incarnation of macros.py is only used to disable the (d)trace macros. Rename it so it better reflects its purpose. A new macros.py will be added in a follow-up commit.