summaryrefslogtreecommitdiff
path: root/node.gyp
AgeCommit message (Collapse)Author
2014-10-12v8_platform: provide default v8::Platform implFedor Indutny
Provide default Platform implementation for v8's purposes.
2014-10-09freebsd,linux,sunos: make stack non-executableBen Noordhuis
Link with -z,noexecstack to make stack memory non-executable. Makes shellcode injection through buffer overflows more difficult. Fixes: https://github.com/joyent/node/issues/7542 PR-URL: https://github.com/node-forward/node/pull/8 Reviewed-By: Trevor Norris <trevnorris@gmail.com>
2014-10-08deps: re-implement debugger-agentFedor Indutny
Reviewed-By: Trevor Norris <trevnorris@gmail.com> PR-URL: https://github.com/joyent/node/pull/8476
2014-10-01build, i18n: improve Intl build, add "--with-intl"Steven R. Loomis
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>
2014-09-17win: manifest node.exe for Windows 8.1Alexis Campailla
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>
2014-08-17gyp: preserve v8dbg syms on freebsd tooFedor Indutny
2014-08-08build: linking CoreFoundation framework for OSXThorsten Lorenz
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>
2014-08-07Merge remote-tracking branch 'upstream/v0.10' into v0.12Timothy J Fontaine
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
2014-07-31gyp: do not rm unused openssl syms on osx/linuxFedor Indutny
fix #8026 Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-07-29Merge remote-tracking branch 'origin/v0.10' into masterFedor Indutny
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
2014-07-23test: fix test-tls-server-verifyFedor Indutny
fix #7963
2014-07-23gyp: fix post-mortem in v0.11Fedor Indutny
Expose missing constants and keep symbols on OSX.
2014-07-17gyp: do not let `v8dbg_` slip away on osxFedor Indutny
Pass `-force_load` to linker when linking to `libv8_base` to preserve `v8dbg_` symbols, which are useful for debugging.
2014-07-08contextify: remove useless header fileFedor Indutny
fix #7910
2014-06-10Merge remote-tracking branch 'upstream/v0.10'Timothy J Fontaine
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
2014-04-01configure: make --v8-options switch more robustBen Noordhuis
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.
2014-03-29crypto: move `createCredentials` to tlsFedor Indutny
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
2014-03-29configure: --v8-options optionFedor Indutny
Introduce a way to set some v8 flags at compile time, the values should be separated by comma.
2014-03-23build: fix g++ 4.8 build, disable -WerrorBen Noordhuis
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.
2014-03-02Merge remote-tracking branch 'origin/v0.10'Fedor Indutny
Conflicts: configure lib/_stream_readable.js lib/http.js src/node_dtrace.cc
2014-02-21gyp: specialize node.d for freebsdFedor Indutny
`node.d` should use `psinfo.d` instead of `procfs.d` and have statically defined architecture on FreeBSD.
2014-02-10bindings: add spawn_sync bindingsBert Belder
This implements a nested event loop that makes it possible to control a child process, while blocking the main loop until the process exits.
2014-02-05src: add tracing.v8.on('gc') statistics hooksBen Noordhuis
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.
2014-01-27node: register modules from DSO constructorsKeith M Wesolowski
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.
2014-01-24Merge remote-tracking branch 'upstream/v0.10'Timothy J Fontaine
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
2014-01-16gyp: fix `ninja` build on linuxFedor Indutny
fix #6679
2014-01-07build: unconditionally disable -WerrorBen Noordhuis
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.
2013-12-11gyp: build openssl-cli tool and use it in testsFedor Indutny
fix #6663
2013-12-10Merge branch 'v0.10'Fedor Indutny
Conflicts: lib/tls.js src/node_crypto.cc src/node_crypto.h
2013-12-10build: only whole archive on static v8 buildsTimothy J Fontaine
Closes #6629
2013-12-01Merge remote-tracking branch 'upstream/v0.10'Timothy J Fontaine
Conflicts: src/stream_wrap.cc
2013-12-01build: include postmortem symbols on linuxTimothy J Fontaine
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.
2013-11-12base-object: add BaseObjectTrevor Norris
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.
2013-10-31node: add AsyncListener supportTrevor Norris
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.
2013-10-29build: use zero overhead systemtap probesBen Noordhuis
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.
2013-09-25src: remove ObjectWrap dependency from coreBen Noordhuis
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.
2013-09-06src: add multi-context supportBen Noordhuis
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.
2013-09-04build: remove unused Carbon dependencyBen Noordhuis
Libuv as of joyent/libuv@d48168a no longer has link-time dependencies on the Carbon framework or any other frameworks.
2013-08-26src: remove pointless node_os.h header fileBen Noordhuis
src/node_os.cc doesn't export anything that's used elsewhere. Remove it.
2013-08-21vm, core, module: re-do vm to fix known issuesDomenic Denicola
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
2013-08-06tls_wrap: DRY ClientHelloParserFedor Indutny
Share ClientHelloParser code between `tls_wrap.cc` and `node_crypto.cc`. fix #5959
2013-08-05build: fix ia32 sunos, elfwrap only needs -64Timothy J Fontaine
2013-08-05build: embed the mdb_v8.so into the binaryTimothy J Fontaine
This builds and includes the mdb_v8.so in the binary of node so mdb can be sure to always use the latest version
2013-08-01src: Replace macros with util functionsisaacs
2013-07-29src: don't use NewExternal() with unaligned stringsBen Noordhuis
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
2013-07-24lib: macro-ify type checksBen Noordhuis
Increases the grep factor. Makes it easier to harmonize type checks across the code base.
2013-07-24src: rename macros.py to notrace_macros.pyBen Noordhuis
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.
2013-07-20src: add libuv bindings moduleBen Noordhuis
Exports: * all UV_E* error codes * a uv_err_name() binding
2013-07-19smalloc: create separate moduleTrevor Norris
It will be confusing if later on we add Buffer#dispose(), and smalloc is its own cpp api anyways. So instead create a new require('smalloc') to expose the previous Buffer.alloc/dispose methods, and expose copyOnto and kMaxLength as well. Other changes: * Added documentation and additional tests. * smalloc::CopyOnto has changed from using assert() to throwing errors on bad argument values because it is not exposed to the user. * Minor style fixes.
2013-07-09configure: fix the --without-ssl optionNathan Rajlich
Closes #5807.