0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

150 Commits

Author SHA1 Message Date
Franziska Hinkelmann
e7f30db1a6 deps: cherry-pick 3c8195d from V8 upstream
Original commit message:

  [map] Fix map constructor to correctly throw.

  We need to throw before rethrowing, otherwise the exception does
  not trigger a debugger event and is not reported if uncaught.

  R=gsathya@chromium.org, jgruber@chromium.org

  Bug: v8:7047
  Change-Id: I7ce0253883a21d6059e4e0ed0fc56dc55a0dcba6
  Reviewed-on: https://chromium-review.googlesource.com/758372
  Reviewed-by: Jakob Gruber <jgruber@chromium.org>
  Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#49237}

PR-URL: https://github.com/nodejs/node/pull/16897
Fixes: https://github.com/nodejs/node/issues/16856
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-11-14 09:29:45 +01:00
Franziska Hinkelmann
ccab7d1dac deps: cherry-pick cc55747 from V8 upstream
This fixes the flaky message/console test on our CI.

Original commit message:
  [test/message] Allow numbers to have more than one leading digit.

  The {NUMBER} regexp only allowed one, leading to occasional test
  failures such as:
  https://build.chromium.org/p/client.v8/builders/V8%20Mac%20-%20debug/builds/17156

  Bug:
  Change-Id: I25a08b80640d9af19ba70c61c846163685f1cb82
  Reviewed-on: https://chromium-review.googlesource.com/753322
  Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
  Commit-Queue: Georg Neis <neis@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#49109}

PR-URL: https://github.com/nodejs/node/pull/16890
Ref: https://github.com/nodejs/build/issues/936
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-10 12:35:14 +01:00
Daniel Bevenius
e5238ed030 deps: cherry-pick b8331cc030 from upstream V8
Original commit message:

    I believe the paths to the V8 include headers are incorrect. The
    paths to other sources seem to be relative to the parent directory.

    When building Node.js I get the following warning on Windows:
    Warning: Missing input files:
    deps\v8\src\..\..\include\v8-inspector-protocol.h
    deps\v8\src\..\..\include\v8-inspector.h

    This commit updates the two include paths.

    Bug:
    Change-Id: I51a057abba61e294e7811ba69db03e283b0bdc3f
    Reviewed-on: https://chromium-review.googlesource.com/743981
    Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49121}

This commit also increments the v8_embedder_string version.

PR-URL: https://github.com/nodejs/node/pull/16900
Fixes: https://github.com/nodejs/node/issues/16614
Refs: b8331cc030
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-11-09 11:48:02 +01:00
Ed Schouten
78dbcbe559
build,src: Add CloudABI as a POSIX-like runtime environment.
CloudABI is a compact POSIX-like runtime that makes use of
capability-based security. More details:
https://github.com/NuxiNL/cloudlibc

* src: Disable use of pwd.h, grp.h and get*uid() on CloudABI.
As CloudABI is intended to run applications in cluster contexts (e.g.,
on Kubernetes), they are oblivious of UNIX credentials. Extend the
existing preprocessor checks to disable any use of these interfaces,
just like on Windows, Android, etc.

* src: Explicitly include <netdb.h>.
cares_wrap.cc calls into functions like getnameinfo() and getaddrinfo().
These functions tend to be available implicitly through <uv.h>, but we'd
better still include this header explicitly.

On CloudABI, we make use of a custom implementation of libuv that does
not implicitly include header files like <netdb.h>.

PR-URL: https://github.com/nodejs/node/pull/16612
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-11-01 17:55:20 -04:00
Ali Ijaz Sheikh
c087502758 deps: V8: backport b1cd96e from upstream
Original commit message:
  [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged

  R=dgozman@chromium.org

  Bug: none
  Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
  Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582
  Reviewed-on: https://chromium-review.googlesource.com/726490
  Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
  Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#48705}

PR-URL: https://github.com/nodejs/node/pull/16308
Refs: b1cd96ec4b
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-10-29 09:38:30 -07:00
Michaël Zasso
edd78f86ac deps: cherry-pick e0d64dc from upstream V8
Original commit message:

    [heap] Print the number of chunks in unmapper queue in --trace-gc-nvp

    Bug: chromium:771966
    Change-Id: I146b279c4713b7dd716c6d55ca5e6c6e23a3ad7e
    Reviewed-on: https://chromium-review.googlesource.com/704740
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48338}

Refs: e0d64dc67c
Refs: https://github.com/nodejs/help/issues/917#issuecomment-339292642
Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=771966

PR-URL: https://github.com/nodejs/node/pull/16490
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-28 13:01:45 +02:00
Michaël Zasso
cf38d2f402 deps: cherry-pick 676c413 from upstream V8
Original commit message:

    [heap] Fix threshold for delayed chunks after 2c7561.

    Bug: chromium:771966
    Change-Id: Iac5ee55c0d31de477f21f091f4be015a1ca8d00c
    Reviewed-on: https://chromium-review.googlesource.com/702382
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48316}

Refs: 676c41321a
Refs: https://github.com/nodejs/help/issues/917#issuecomment-339292642
Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=771966

PR-URL: https://github.com/nodejs/node/pull/16490
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-28 13:01:37 +02:00
Michaël Zasso
55a4d66843 deps: cherry-pick 2c75616 from upstream V8
Original commit message:

    [heap] Ensure progress in unmapping memory chunks.

    If sweeping is not making progress and there are many young generation
    GCs happening, then this can lead to accumulation of memory chunks in
    the unmapper queue.

    Bug: chromium:771966
    Change-Id: Ief73ada0d17198a80b668850c6d2e7ea413113e7
    Reviewed-on: https://chromium-review.googlesource.com/702479
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48312}

Refs: 2c75616028
Refs: https://github.com/nodejs/help/issues/917#issuecomment-339292642
Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=771966

PR-URL: https://github.com/nodejs/node/pull/16490
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-28 12:57:51 +02:00
Nikolai Vavilov
4108072457 build,win: set /MP separately in Debug and Release
Setting /MP globally causes it to appear twice in the command line due
to a GYP bug, which causes the project to be rebuilt unconditionally due
to an msbuild bug.

PR-URL: https://github.com/nodejs/node/pull/16415
Fixes: https://github.com/nodejs/node/issues/16367
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-24 21:34:33 +03:00
Franziska Hinkelmann
801e61ad5a deps: cherry-pick 37a3a15c3 from V8 upstream
Original commit message:
  [api] Intercept DefineProperty after Descriptor query

  Analog to other interceptors, intercept the DefineProperty
  call only after obtaining the property descriptor.

  This behavior allows us to mirror calls on a sandboxed object
  as it is needed in Node. See for example
  https://github.com/nodejs/node/pull/13265

  Bug:
  Change-Id: I73b8f8908d13473939b37fb6727858d0bee6bda3
  Reviewed-on: https://chromium-review.googlesource.com/725295
  Reviewed-by: Andreas Haas <ahaas@chromium.org>
  Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#48683}

PR-URL: https://github.com/nodejs/node/pull/16294
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-23 11:50:06 +02:00
Nikolai Vavilov
5018156628 build,win: use /MP for debug builds
PR-URL: https://github.com/nodejs/node/pull/16333
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-21 13:17:08 +03:00
Nikolai Vavilov
8f5fedb555 build, windows: use /bigobj for debug builds
PR-URL: https://github.com/nodejs/node/pull/16289
Fixes: https://github.com/nodejs/node/issues/16288
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-19 12:04:29 +03:00
Tobias Tebbi
c39caa997c deps: backport 0f1dfae from V8 upstream
Original commit message:

    avoid constructor inheritance due to compilation issues

    Constructor inheritance of a templated constructor is causing compilation issues for node.js:

    https: //github.com/nodejs/node/pull/15362#issue-257007421
    Change-Id: I7d099ff5a1a2fd5b19c11112ddef8fe824e509f7
    Reviewed-on: https://chromium-review.googlesource.com/707008
    Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48445}

Refs: 0f1dfae050
PR-URL: https://github.com/nodejs/node/pull/15362
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-10-18 17:05:28 -07:00
Ali Ijaz Sheikh
33f5014b37 deps: v8: fix potential segfault in profiler
This change fixes a potential segfault in the sampling heap profiler.
This landed as part of a larger change upstream [1]. This is the minimal
backport that avoids the segfault.

[1]: https://git.io/vdTYL

PR-URL: https://github.com/nodejs/node/pull/15498
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-18 17:05:11 -07:00
Anna Henningsen
d7456ab2eb deps: cherry-pick 9b21865822243 from V8 upstream
Original commit message:

    [api] Add optional data pointer to GC callbacks

    This can be useful when there may be multiple callbacks attached by
    code that's not directly tied to a single isolate, e.g. working
    on a per-context basis.

    This also allows rephrasing the global non-isolate APIs in terms
    of this new API, rather than working around it inside `src/heap`.

    TBR=hpayer@chromium.org

    Bug:
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
    Change-Id: I2e490ec40d1a34ea812f25f41ef9741d2116d965
    Reviewed-on: https://chromium-review.googlesource.com/647548
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Adam Klein <adamk@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47923}

PR-URL: https://github.com/nodejs/node/pull/15391
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-18 17:04:41 -07:00
Michaël Zasso
70832bc353 build: add V8 embedder version string
After this commit, `process.versions.v8` will look like:
"6.0.287.53-node.0".
The goal is that everytime we apply a non-official patch to `deps/v8`,
we increment our own number instead of V8's patch level.
This number must be set back to 0 after major V8 updates.

Fixes: https://github.com/nodejs/node/issues/15698
PR-URL: https://github.com/nodejs/node/pull/15785
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-18 09:18:32 -07:00
Anna Henningsen
cc443cb447
build: set disable_glibcxx_debug flag
This breaks a few tests when Node is built in debug mode, because
V8 is built with `-D_GLIBCXX_DEBUG=1` and Node is built without,
which makes e.g. `std::vector` ABI-incompatible between the two.

PR-URL: https://github.com/nodejs/node/pull/16159
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-10-15 12:30:00 +02:00
nanaya
8979b4fc9f
tools: skip workaround for newer llvm
PR-URL: https://github.com/nodejs/node/pull/14077
Fixes: https://github.com/nodejs/node/issues/14076
Refs: https://svnweb.freebsd.org/ports/head/www/node/Makefile?revision=444555&view=markup
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-22 10:44:10 -04:00
Daniel Bevenius
bb88caec06 build: fix ninja build failure
When working on commit 6a09a69ec9
("build: enable cctest to use generated objects") I did not take into
account building with ninja:

$ ./configure
$ tools/gyp_node.py -f ninja
$ ninja -C out/Release
$ ln -fs out/Release/node node

When ninja generated the ninja build files, src files that are
relative to the src directory will be named with a dot instead of a
path separator, for example:

out/Release/obj/src/node/node.o
would instead become:
out/Release/obj/src/node.node.o

This commit adds an additional variable for the type of object separator
used for this case.

Currently the check for if ninja is being used is a normal if statement
as are the following os checks (win and aix). But the win and aix ones
should only be evaluated if the build is not generated by ninja.
This commit turns this logic into an if ninja else statement.

PR-URL: https://github.com/nodejs/node/pull/12484
Fixes: https://github.com/nodejs/node/issues/12448
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-11 08:10:16 -04:00
Michaël Zasso
bf5c309b5e build: fix V8 build on FreeBSD
Use the -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 flag because on FreeBSD
std::pairs copy constructor is non-trivial.

Refs: https://lists.freebsd.org/pipermail/freebsd-toolchain/2016-March/002094.html
Refs: https://github.com/gliaskos/freebsd-chromium/blob/master/www/chromium/Makefile#L202-L205

PR-URL: https://github.com/nodejs/node/pull/12784
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-05-06 20:02:35 +02:00
Anna Henningsen
c68da89694
build: always use V8_ENABLE_CHECKS in debug mode
Define `V8_ENABLE_CHECKS` in `common.gypi` for the debug mode.
Without this, these checks would only be present in the object files
generated from the V8 build, and so for inline functions in v8.h
multiple different definitions could be generated, where one definition
includes the check and the other does not.

Refs: https://github.com/nodejs/node/pull/11975#discussion_r108005423
PR-URL: https://github.com/nodejs/node/pull/12029
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
2017-03-31 22:12:57 +02:00
Daniel Bevenius
6a09a69ec9 build: enable cctest to use generated objects
This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

PR-URL: https://github.com/nodejs/node/pull/11956
Ref: https://github.com/nodejs/node/pull/9163
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 08:28:43 -07:00
Daniel Bevenius
f0d4237ef5 build: mac OBJ_DIR should point to obj.target
I think there might be an issue with the value of OBJ_DIR when
using a "mac" os. The value is currently specified in common.gypi
which is included by node.gyp:
'OBJ_DIR': '<(PRODUCT_DIR)/obj',

In the generated Makefile (out/Makefile) the object output directory
is:
obj := $(builddir)/obj

And in the included node.target.mk we have the OBJS declared:
OBJS := \
         $(obj).target/$(TARGET)/src/async-wrap.o \
         $(obj).target/$(TARGET)/src/cares_wrap.o \

If OBJ_DIR is used in node.gyp to point to generated object files
on mac they will not be found.

PR-URL: https://github.com/nodejs/node/pull/11857
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-17 13:50:27 +01:00
Junliang Yan
b806e18dd7 s390: enable march=z196
PR-URL: https://github.com/nodejs/node/pull/11730
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-10 08:38:08 -05:00
Kenan Yildirim
70afe9d3ac build: fix building with ninja on linux
On Linux, `ninja` appears to place `libv8_base.a` inside `OBJ_DIR`, as opposed
to `ninja` on OS X which places it outside of that directory. Furthermore, the
expected `OBJ_DIR` value (`obj.target/`) is actually just `obj/` for `ninja`.
This patch solves both of these issues by setting `OBJ_DIR` and `V8_BASE` to the
correct values for `ninja` on Linux specifically.

PR-URL: https://github.com/nodejs/node/pull/11348
Fixes: https://github.com/nodejs/node/issues/9861
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-16 17:16:26 -08:00
Ben Noordhuis
97ebdf3bed build: disable C4267 conversion compiler warning
Disable "warning C4267: conversion from 'size_t' to 'int', possible
loss of data".  Many originate from our dependencies and their sheer
number drowns out other, more legitimate warnings.

PR-URL: https://github.com/nodejs/node/pull/11205
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-02-09 14:43:55 +01:00
Aaron Bieber
a0c6898c89 build: use wxneeded on openbsd
On OpenBSD 6.0 and greater W^X is enabled by default. All executables
that violate W^X need to be marked with PT_OPENBSD_WXNEEDED. In
addition to this, they must be executed from a filesystem mounted with
'wxallowed'.

More info on W^X: https://en.wikipedia.org/wiki/W%5EX

PR-URL: https://github.com/nodejs/node/pull/9232
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-28 09:14:20 -07:00
Ali Ijaz Sheikh
7292a1e954 build: use libc++ on OSX
V8 now depends on C++11 runtime features. On OSX this requires us to
link against the libc++ library rather than the deprecated default
that is provided with -mmacosx-version-min=10.7.

PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-09-22 09:55:30 +02:00
Ali Ijaz Sheikh
785506a1fc build: define icu_use_data_file_flag
v8.gyp expects this to be defined by the embedder

PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-09-22 09:54:56 +02:00
Michaël Zasso
fbfc15c51b build: update V8 gypfile paths
The location of various gypfiles has changed in V8 5.2.

PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2016-09-22 09:53:18 +02:00
Ben Noordhuis
e03a7b2a2b build: turn on thin static archives
Thin archives were disabled in 2012 as a workaround (IIRC) for obsolete
tooling on one of Joyent's platforms.  The last binutils versions that
didn't support them was released in 2007 so I think it's safe to assume
we can drop support for that now - except on SmartOS, where the tooling
still has a distinctive vintage feel to it.

Thin archives save space - it shrinks the size of PRODUCT_DIR by 30% -
and speed up the final linking step because it doesn't have to assemble
50 MB of static archives (twice! - first to create the archive, then to
copy it to PRODUCT_DIR).  The archives are just 3.5 MB now and no longer
copied around.

PR-URL: https://github.com/nodejs/node/pull/7957
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-09 14:06:50 +02:00
Stefan Budeanu
88e862ba82 build: windows sharedlib support
Added "dll" option to vcbuild.bat
Insure that Unix SO name is not used on Windows (i.e. produce a .dll file)
Insure that Node and its V8 dependency link against the Visual C++ Runtime
dynamically.
Requires backported V8 patch, see PR 7802.

Ref: https://github.com/nodejs/node/pull/7802

PR-URL: https://github.com/nodejs/node/pull/7487
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-08-05 09:27:48 -04:00
Ben Noordhuis
6945aa7085 build: don't link against liblog on host system
Don't link binaries that run on the host system against liblog, it
breaks cross-compiling for android.

Fixes: https://github.com/nodejs/node/issues/7731
PR-URL: https://github.com/nodejs/node/pull/7762
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-01 16:22:48 +02:00
Gireesh Punathil
d80432db76 build: enable big toc for release builds in AIX
AIX linker has a table of contents with default size 64K
The recent code inclusions in V8 brings in lot of new
symbols which necessitates to increase this default.

Please note that the debug build already has this flag

Fixes: https://github.com/nodejs/node/issues/7500
PR-URL: https://github.com/nodejs/node/pull/7508
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-05 09:53:13 -04:00
Stefan Budeanu
410296c37a 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>
2016-06-28 17:48:22 -04:00
Ben Noordhuis
584f93aa0d build: don't compile with -B, redux
It looks like suppressing `-B` and `-fuse-ld=gold` from common.gypi is
not very reliable.  I'm positive it worked when commit 3cdb506 ("build:
don't compile with -B") was merged but subsequent updates appear to have
broken it again.

Take the nuclear option and disable them from `tools/node_gyp.py`.

Fixes: https://github.com/nodejs/node/issues/6603
PR-URL: https://github.com/nodejs/node/pull/6650
Refs: https://github.com/nodejs/node/pull/6393
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-10 12:01:10 +02:00
Ben Noordhuis
a5012a04ba build: unbreak -prof, disable PIE on OS X
Commit 204f3a8 ("build: Bump MACOSX_DEPLOYMENT_TARGET to 10.7")
unwittingly turned on new ASLR features that make `-prof` unusable for
profiling C++ code, breaking `test/parallel/test-tick-processor.js` in
the process.  Build with `-Wl,-no_pie` for now.

Fixes: https://github.com/nodejs/node/issues/5903
PR-URL: https://github.com/nodejs/node/pull/6453
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-04-28 20:35:15 -07:00
Ben Noordhuis
3cdb5063f2 build: don't compile with -B
Turn off the custom toolchain, we don't bundle ld.gold.  It's not that
useful anyway because it uses a fixed path.  For people that do use a
custom toolchain, there is the GCC_EXEC_PREFIX environment variable.

PR-URL: https://github.com/nodejs/node/pull/6393
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-04-27 16:35:02 +02:00
Сковорода Никита Андреевич
204f3a8a0b build: Bump MACOSX_DEPLOYMENT_TARGET to 10.7
Refs: https://github.com/nodejs/build/issues/367

libuv is going to drop 10.6 in v2.
Ref: https://github.com/libuv/libuv/pull/758

OS X versions below 10.9 are not supported by Apple anymore and do not
receive security patches.

PR-URL: https://github.com/nodejs/node/pull/6402
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-04-26 10:17:27 -07:00
Ben Noordhuis
71544c5eca build: remove -f{data,function}-sections flags
We don't link with `--gc-sections` because it's unreliable with some
toolchains, so all these flags do is make the compiler generate slightly
worse code.  Drop them.

Refs: https://github.com/nodejs/node/pull/6056
PR-URL: https://github.com/nodejs/node/pull/6077
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-07 13:14:42 +02:00
Michael Dawson
a4c4a852a9 build: enable compilation for linuxOne
Changes to Node core in order to allow compilation for linuxOne.

The ../archs/linux32-s390x/opensslconf.h and
../archs/linux64-s390x/opensslconf.h were automatically
generated by running make linux-ppc linux-ppc64 in the
deps/openssl/config directory as per our standard
practice

After these changes we still need a version of v8
which supports linuxOne but that will be coming soon
in the 5.1 version of v8.  Until then with these changes
we'll be able to create a hybrid build which pulls in
v8 from the http://github/andrewlow repo.

PR-URL: https://github.com/nodejs/node/pull/5941
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-29 18:52:48 -04:00
Fedor Indutny
26a4a4bc93 build: add missing openssl_fips% to common.gypi
See: atom/node@cba512d493

PR-URL: https://github.com/nodejs/node/pull/5919
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-03-27 11:35:03 -04:00
Robert Chiras
271201fea9 build: add suport for x86 architecture
Modified android-configure script to support also x86 arch.
Currently added support only for ia32 target arch.
Also, compile openssl without asm, since using the asm sources will make
node fail to run on Android, because it adds text relocations.

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: https://github.com/nodejs/node/pull/5544
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-22 19:17:28 +01:00
Ben Noordhuis
d461a0763f build: omit -gline-tables-only for --enable-asan
`-gline-tables-only` is a clang-only flag.  Drop it, it's not needed for
address sanitizer-enabled builds and it makes it impossible to build
with gcc.

Fixes: https://github.com/nodejs/node/issues/3656
PR-URL: https://github.com/nodejs/node/pull/3680
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-11-05 18:39:34 +01:00
Michael Dawson
2a17c7f65e build: Updates to enable AIX support
These are the core changes that allow AIX to compile.  There
are still some test failures as there are some patches needed for
libuv and npm that we'll need to contribute through those
communities but this set allows node to be built on AIX and
pass most of the core tests

The change in js2c is because AIX does not support $ in
identifier names.  See the discussion/agreement in
https://github.com/nodejs/node/issues/2272

PR-URL: https://github.com/nodejs/node/pull/2364
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: Rod Vagg <r@va.gg>
2015-09-15 13:17:28 -04:00
Karl Skomski
297b9ae147 build: fix v8_enable_handle_zapping override
It was previously ignored by features.gypi and therefore
enabled by default for release builds.

See https://code.google.com/p/chromium/issues/detail?id=318206

PR-URL: https://github.com/nodejs/node/pull/2731
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-08 23:19:23 +10:00
Karl Skomski
6ed0603fb1 build: add --enable-asan with builtin leakcheck
PR-URL: https://github.com/nodejs/node/pull/2376
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-06 21:38:00 +10:00
Michael Dawson
b4226e797a build: first set of updates to enable PPC support
These are the core changes that allow pLinux BE/LE compile. They
don't include all of the changes needed for AIX which will follow
once we have pLinux up and running in the builds

PR-URL: https://github.com/nodejs/io.js/pull/2124
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu>
2015-08-04 11:56:16 -07:00
Ali Ijaz Sheikh
24dd016deb build: produce symbol map files on windows
This produces map files as part of the build on windows. The existence of
these files enable profiling and tick-processing using the --prof command
line.
See: https://github.com/nodejs/io.js/pull/2090#issuecomment-124746673

Map files are documented here:
https://msdn.microsoft.com/en-us/library/k7xkk3e2.aspx

PR-URL: https://github.com/nodejs/io.js/pull/2243
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-29 09:36:25 -07:00
Fedor Indutny
0f68377f69 crypto: support FIPS mode of OpenSSL
Support building and running with FIPS-compliant OpenSSL. The process is
following:

1. Download and verify `openssl-fips-x.x.x.tar.gz` from
   https://www.openssl.org/source/
2. Extract source to `openssl-fips` folder
3. ``cd openssl-fips && ./config fipscanisterbuild --prefix=`pwd`/out``
   (NOTE: On OS X, you may want to run
    ``./Configure darwin64-x86_64-cc --prefix=`pwd`/out`` if you are going to
    build x64-mode io.js)
4. `make -j && make install`
5. Get into io.js checkout folder
6. `./configure --openssl-fips=/path/to/openssl-fips/out`
7. Build io.js with `make -j`
8. Verify with `node -p "process.versions.openssl"` (`1.0.2a-fips`)

Fix: https://github.com/joyent/node/issues/25463
PR-URL: https://github.com/nodejs/io.js/pull/1890
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-11 01:49:20 +02:00