Commit Graph

191 Commits

Author SHA1 Message Date
davkor
375b859428 build: add build flag for OSS-Fuzz integration
Refs: https://github.com/google/oss-fuzz/pull/3860
Fixes: https://github.com/nodejs/node/issues/33724

PR-URL: https://github.com/nodejs/node/pull/34761
Fixes: https://github.com/nodejs/node/issues/33724
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-15 14:59:07 -07:00
Mary Marchini
b5e3fca04c
build: set --v8-enable-object-print by default
The flag improves the experience of debugging V8 with native debuggers.
It doens't incur performance penality, the only downside is an increase
in binary size by approximately 248 Kb.

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

PR-URL: https://github.com/nodejs/node/pull/34705
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-08-12 08:47:04 -07:00
Mary Marchini
dd0c5228ac
build: add flag to build V8 with OBJECT_PRINT
Add a configure flag to build V8 with `-DOBJECT_PRINT`, which will
expose auxiliar functions to inspect heap objects using native
debuggers.

Fixes: https://github.com/nodejs/node/issues/32402
Signed-off-by: Mary Marchini <mmarchini@netflix.com>

PR-URL: https://github.com/nodejs/node/pull/32834
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-08-09 22:48:30 -07:00
Nathan Blair
409fdba6d5
configure: account for CLANG_VENDOR when checking for llvm version
Fixes: https://github.com/nodejs/node/issues/29536

PR-URL: https://github.com/nodejs/node/pull/33860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-24 17:10:16 -07:00
Ben Noordhuis
dca816325d
build: configure byte order for mips targets
The build defaulted to the byte order of the host system but
that can be different from the endianness of the target system.

Refs: https://github.com/nodejs/node/issues/33703#issuecomment-644639158

PR-URL: https://github.com/nodejs/node/pull/33898
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-24 16:50:13 -07:00
James M Snell
55360443ce
quic: initial QUIC implementation
Co-authored-by: Anna Henningsen <anna@addaleax.net>
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Co-authored-by: gengjiawen <technicalcute@gmail.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Lucas Pardue <lucaspardue.24.7@gmail.com>
Co-authored-by: Ouyang Yadong <oyydoibh@gmail.com>
Co-authored-by: Juan Jos<C3><A9> Arboleda <soyjuanarbol@gmail.com>
Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com>
Co-authored-by: Denys Otrishko <shishugi@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-16 09:23:34 -07:00
Daniel Bevenius
7f8e977ee0 src,build: add --openssl-default-cipher-list
This commit adds a configuration option named
openssl-default-cipher-list which takes a colon separated string
specifying ciphers that should be used as the default ciphers instead of
the ones defined in node_constants.

The motivation for this is a use case where Fedora/RHEL would like
to be able to specify a default cipher in the format PROFILE=SYSTEM.
This would enable Fedora/RHEL to have a system wide security level for
all applications.

PR-URL: https://github.com/nodejs/node/pull/33708
Refs: https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies/
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-06-08 13:21:54 +02:00
Maciej Kacper Jagiełło
01c4455de7 build: add --v8-lite-mode flag
PR-URL: https://github.com/nodejs/node/pull/33541
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 04:26:57 +02:00
Thomas
5e4c025567 build: fix makefile script on windows
On Windows there is a program "find.exe" located in
C:\Windows\System32, which is usually in the PATH before
MSYS version of that program (required for running makefile).
The Windows version of the program uses different CLI syntax,
which results in errors like

  "File not found - *node_modules*"

This commit specifies the full path to the program, which is also
properly handled by MSYS on Windows.

PR-URL: https://github.com/nodejs/node/pull/33136
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-05-25 19:23:09 +02:00
Richard Townsend
8833551257 build,win: add support for MSVC cross-compilation
* Fixes cases in icutools where commands were issued without .exe
* Changes to build scripts
* Add /fp:strict flag so that MSVC's floating point behaves correctly
* Enables marmasm

PR-URL: https://github.com/nodejs/node/pull/32867
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2020-05-19 19:30:40 +01:00
Daniel Bevenius
a7ae7aab59 build: add --error-on-warn configure flag
This commit adds a configuration time flag named error-on-warn:
$ ./configure --help | grep -A1 error-on-warn
  --error-on-warn       Turn compiler warnings into errors for node core
                        sources.

The motivation for this is that CI jobs can use this flag to turn
warnings into errors.

PR-URL: https://github.com/nodejs/node/pull/32685
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2020-04-30 06:16:45 +02:00
Anna Henningsen
d1587dcd0a
build: add configure flag to build V8 with DCHECKs
Add a configure flag that enables building V8 with `-DDEBUG`, in
particular with debug checks enabled and with runtime debugging
features, e.g. inspecting JS objects from debuggers, enabled.

PR-URL: https://github.com/nodejs/node/pull/32787
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-04-14 02:56:06 +02:00
Richard Lau
7251e8c268 build: log detected compilers in --verbose mode
Log the versions of the detected compilers when the configure script
is run with `--verbose` to help verify which compiler is being used if
multiple toolchains are installed on the system.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32715
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-09 09:00:17 -07:00
Sam Roberts
131b50d187 build: expand ASAN acronym in configure help
There is lots of space to expand this not-so-well-known acronym in the
option usage message.

PR-URL: https://github.com/nodejs/node/pull/32325
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-20 14:28:52 -07:00
cjihrig
765c3759ef
build: make --without-report a no-op
This commit makes the configure --without-report flag a no-op.
This commit also updates a test that depends on the report CLI
flags being conditionally present.

PR-URL: https://github.com/nodejs/node/pull/32242
Fixes: https://github.com/nodejs/node/issues/26293
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-03-15 13:29:34 -04:00
André Draszik
616b7fbcb1
build: allow use of system-installed brotli
brotli is available as a shared library since 2016, so it makes sense
to allow its use as a system-installed version.

Some of the infrastructure was in place already (node.gyp and
node.gypi), but some bits in the configure script here were missing.

Add them, keeping the default as before, to use the bundled version.

Refs: https://github.com/google/brotli/pull/421
Signed-off-by: André Draszik <git@andred.net>

PR-URL: https://github.com/nodejs/node/pull/32046
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-03-09 13:20:47 +01:00
André Draszik
d3af527152
build: allow passing multiple libs to pkg_config
Sometimes it's necessary to pass multiple library names to pkg-config,
e.g. the brotli shared libraries can be pulled in with
    pkg-config libbrotlienc libbrotlidec

Update the code to handle both, strings (as used so far), and lists
of strings.

Signed-off-by: André Draszik <git@andred.net>

PR-URL: https://github.com/nodejs/node/pull/32046
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-03-09 13:20:45 +01:00
Anna Henningsen
375c7649ec
build: add configure option to debug only Node.js part of the binary
Building Node.js with `--debug` takes a long time and generates
binaries that can be hard to work with due to their size, in
particular because debug builds of V8 are large.

Sometimes, it’s sufficient to build the Node.js parts with native
debugging options enabled. Add an option for that.

PR-URL: https://github.com/nodejs/node/pull/31644
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-02-08 17:12:30 +01:00
Gus Caplan
43fb6ffef7
build: enable loading internal modules from disk
PR-URL: https://github.com/nodejs/node/pull/31321
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-01-31 01:22:12 -08:00
SpaceRacet5w2A6l0I
bd6d6512f0 build: avoid using CMP for BZ2File
Some Python distributions do not support
context manager protocol (CMP) for BZ2File.

PR-URL: https://github.com/nodejs/node/pull/31198
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
2020-01-07 23:58:20 -08:00
Gabriel Schulhof
c6822be46c build: warn upon --use-largepages config option
Emit a warning when the user configures with `--use-largepages` and/or
`--use-largepages-script-lld` informing them that the option is now
available as a Node.js runtime option once it is built.

Refs: https://github.com/nodejs/node/pull/31063#discussion_r361143460
PR-URL: https://github.com/nodejs/node/pull/31103
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2019-12-28 09:54:55 -08:00
Gabriel Schulhof
3d500015fe build: re-introduce --use-largepages as no-op
Re-introduce the build-time option as a no-op in order to retain
backward compatibility for LTS purposes.

Re: https://github.com/nodejs/node/pull/31063#pullrequestreview-336045756
PR_URL: https://github.com/nodejs/node/pull/31075
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-12-25 18:42:15 -08:00
Gabriel Schulhof
8952105e57 src: make --use-largepages a runtime option
Moves the option that instructs Node.js to-remap its static code to
large pages from a configure-time option to a runtime option. This
should make it easy to assess the performance impact of such a change
without having to custom-build.

PR-URL: https://github.com/nodejs/node/pull/30954
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Co-authored-by: David Carlier <devnexen@gmail.com>
2019-12-22 11:49:26 -08:00
Stephen Gallagher
d502b83cbd build: auto-load ICU data from --with-icu-default-data-dir
When compiled with `--with-intl=small` and
`--with-icu-default-data-dir=PATH`, Node.js will use PATH as a
fallback location for the ICU data.

We will first perform an access check using fopen(PATH, 'r') to
ensure that the file is readable. If it is, we'll set the
icu_data_directory and proceed. There's a slight overhead for the
fopen() check, but it should be barely measurable.

This will be useful for Linux distribution packagers who want to
be able to ship a minimal node binary in a container image but
also be able to add on the full i18n support where needed. With
this patch, it becomes possible to ship the interpreter as
/usr/bin/node in one package for the distribution and to ship the
data files in another package (without a strict dependency
between the two). This means that users of the distribution will
not need to explicitly direct Node.js to locate the ICU data. It
also means that in environments where full internationalization is
not required, they do not need to carry the extra content (with
the associated storage costs).

Refs: https://github.com/nodejs/node/issues/3460

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

PR-URL: https://github.com/nodejs/node/pull/30825
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-13 20:54:12 -05:00
Giovanni Campagna
99fe9dd112 build: fix library version and compile flags on Android
Compiling a library with -fPIE won't do, and on Android libraries
are not versioned.

PR-URL: https://github.com/nodejs/node/pull/29388
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-12 09:10:09 -05:00
Matteo Collina
086c7b41b2 build: add flag to enable pointer compression
The --experimental-enable-pointer-compression is experimental
as it breaks ABI compatibility.

PR-URL: https://github.com/nodejs/node/pull/30463
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-11 19:34:15 -05:00
Joyee Cheung
8cf8eb16ac
build: do not build mksnapshot and mkcodecache for --shared
To build mkcodecache and mksnapshot (they are executables),
we currently build libnode with unresolved symbols, then build
the two exectuables with src/node_snapshot_stub.cc and
src/node_code_cache_stub.cc. Each of them write a C++ file to
disk when being run. We then use the generated C++ files & libnode
(with unresolved symbols) to build the final Node executable.

However, if libnode itself is the final product, then we should
not build it with unresolved symbols.
https://github.com/nodejs/node/pull/28897 added the two stubs
for the libnode target when the --shared configure option is used,
but it did not get rid of the actions to build and run mksnapshot
and mkcodecache for --shared, so to get it working we also
need a patch to make sure --shared imply --without-node-code-cache
and --without-node-snapshot, until we actually fix the TODO so that
mksnapshot and mkcodecache do not use the libnode that way.

PR-URL: https://github.com/nodejs/node/pull/30647
Refs: https://github.com/nodejs/node/issues/28845
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-12-03 17:30:44 +08:00
Joyee Cheung
6fd2898601
build: add --without-node-code-cache configure option
So that it's possible to build without code cache (in particular,
without building mkcodecache) for testing.

PR-URL: https://github.com/nodejs/node/pull/30647
Refs: https://github.com/nodejs/node/issues/28845
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-12-03 17:30:30 +08:00
Ben Noordhuis
efb406ccd5 build: fix pkg-config search for libnghttp2
The configure script was searching for 'nghttp2' whereas the actual name
of the package is 'libnghttp2'.

This change also removes the hack for libcares in one fell swoop.

Co-Authored-By: legendecas <legendecas@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/30145
Fixes: https://github.com/nodejs/node/issues/30113
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2019-10-31 09:36:13 +01:00
Rod Vagg
779d7efa72
build: python3 support for configure
PR-URL: https://github.com/nodejs/node/pull/30047
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-10-24 10:28:44 +11:00
Richard Lau
639085e410 build: log the found compiler version if too old
`configure` will log a warning if the detected compiler is not new
enough. Take some of the guesswork out of it by also logging the
version of the compiler that was detected.

PR-URL: https://github.com/nodejs/node/pull/30028
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-10-22 13:44:05 -05:00
Michaël Zasso
0822bfaa9f
build: make configure --without-snapshot a no-op
From V8 7.9, the option will no longer exist upstream.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1796325

PR-URL: https://github.com/nodejs/node/pull/30021
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-10-20 16:45:35 +02:00
Michaël Zasso
d769ebc2b7
build: fix version checks in configure.py
Fixes: https://github.com/nodejs/node/issues/29927
Refs: https://github.com/nodejs/node/pull/29931

PR-URL: https://github.com/nodejs/node/pull/29965
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-10-18 09:29:15 +02:00
Michaël Zasso
6c205aba00
build: always use strings for compiler version in gyp files
If GYP finds a string variable that can be converted to an integer,
it will do it when the variable is expanded. Use "0.0" instead of "0"
to force strings and be able to use comparison operations such as
`gas_version >= "2.26"` in Python 3.

PR-URL: https://github.com/nodejs/node/pull/29897
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-10-13 20:28:17 +02:00
Steven R. Loomis
1a25e901b7 tools: support full-icu by default
Instead of an English-only icudt64l.dat in the repo,
we now have icudt64l.dat.gz with all locales.

- updated READMEs and docs
- shrinker now copies source, and compresses (bzip2) the ICU data file
- configure expects deps/icu-small to be full ICU with a full
compressed data file

Fixes: https://github.com/nodejs/node/issues/19214
Co-Authored-By: Richard Lau <riclau@uk.ibm.com>
Co-Authored-By: Jan Olaf Krems <jan.krems@gmail.com>
Co-Authored-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/29522

Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-10-03 15:21:26 -07:00
Kamil Rytarowski
233cdb64a9 build: allow clang 10+ in configure.py
Detected on NetBSD/amd64.

Fixes: https://github.com/nodejs/node/issues/29536

PR-URL: https://github.com/nodejs/node/pull/29541
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-09-14 19:38:07 -07:00
Joyee Cheung
f96f9fbe31 build: make --without-snapshot imply --without-node-snapshot
PR-URL: https://github.com/nodejs/node/pull/29294
Fixes: https://github.com/nodejs/node/issues/29243
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-27 06:58:20 +02:00
David Carlier
32df017c5f src: add large page support for macOS
Proposal to bring the support for this platform.
We assume the pse36 cpu flag is present for 2MB
large page support present in recent years
in mac line (not to be backported to 10.x anyway).
Recommended better for mac production servers rather
than casual mac books.

PR-URL: https://github.com/nodejs/node/pull/28977
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-20 11:43:47 -07:00
David Carlier
0d7acfac82 build: enable linux large pages LLVM lld linkage support
The custom linker script is compatible with GNU ld only.
As such, providin a new expliciting option to redirect to
a different one. lld seems unable to migrate this
large section w/o segfaulting so providing only the
base address anchor for now.

PR-URL: https://github.com/nodejs/node/pull/28938
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-08-19 21:20:18 -07:00
cclauss
a582c6b07c build: support py3 for configure.py
PR-URL: https://github.com/nodejs/node/pull/29106
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-15 20:43:33 -07:00
Ben Noordhuis
fd9e0f72ab build: remove support for s390 (but not s390x)
Upstream V8 removed support for s390 earlier this year and it's known
to no longer build. Remove the support from our build scripts.

Fixes: https://github.com/nodejs/node/issues/28866
PR-URL: https://github.com/nodejs/node/pull/28883
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-30 14:56:26 -07:00
David Carlier
15d44bf6f0 build: update of the large page option error
Now large pages is also supported by FreeBSD.

PR-URL: https://github.com/nodejs/node/pull/28729
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-19 11:44:05 -07:00
David Carlier
a1cb14a4dc src: large pages option: FreeBSD support proposal
Enabling on amd64 and as Linux, are 2MB large.
The ELF section linkage script is compatible only with GNU ld.

PR-URL: https://github.com/nodejs/node/pull/28331
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-15 19:30:07 -07:00
Ben Noordhuis
88bac02bee
build: remove broken intel vtune support
Support for VTune profiling was added in commit a881b53 from November
2015 but has since bitrotted. Remove it.

Fixes: https://github.com/nodejs/node/issues/28310
Refs: https://github.com/nodejs/node/pull/3785

PR-URL: https://github.com/nodejs/node/pull/28522
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-07-15 00:25:27 +02:00
Daniel Bevenius
39a935883d build: remove --code-cache-path help option
This commit removes the now obsolete option.

PR-URL: https://github.com/nodejs/node/pull/28446
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-04 07:03:32 +02:00
gengjiawen
4e09fd7276 build: change ASM compiler url to https
PR-URL: https://github.com/nodejs/node/pull/28189
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-02 16:08:29 +08:00
NickNaso
9868126546 build: expose napi_build_version variable
Expose `napi_build_version` to allow `node-gyp` to make it
available for building native addons.

Fixes: https://github.com/nodejs/node-gyp/issues/1745
Refs: https://github.com/nodejs/abi-stable-node/issues/371
PR-URL: https://github.com/nodejs/node/pull/27835
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-01 22:07:42 -07:00
mutao
eaddb22d92
Revert "build: remove mips support"
This reverts commit 9334e45aa0.

PR-URL: https://github.com/nodejs/node/pull/27992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-06-18 14:28:13 +10:00
Joyee Cheung
28d3f1963a
build: turn on custom V8 snapshot by default
This patch re-enables custom V8 snapshot integration. Also renames
the experimental configure switch from `--with-node-snapshot`
to `--without-node-snapshot` to be consistent with`--without-snapshot`
which is used for the default V8 snapshot.

PR-URL: https://github.com/nodejs/node/pull/28181
Refs: https://github.com/nodejs/node/pull/27365
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-17 10:02:05 +08:00
Ben Noordhuis
30f285da31 build: fix icu-i18n pkg-config version check
The pkg_config() helper can either return a tuple of None values
(no pkg-config installed) and that was what the check was testing
for, but it can also return a tuple of empty strings when the
package isn't installed.

PR-URL: https://github.com/nodejs/node/pull/28118
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-14 15:40:50 -07:00
Ben Noordhuis
16edec8cfa build: don't swallow pkg-config warnings
PR-URL: https://github.com/nodejs/node/pull/28118
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-14 15:40:46 -07:00
Saagar Jha
1f143b8625 build: fix configure script to work with Apple Clang 11
PR-URL: https://github.com/nodejs/node/pull/28071
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
2019-06-11 20:07:08 -04:00
Refael Ackermann
417c18e834 build,v8: sync V8 gypfiles with 7.5
Co-authored-by: Ujjwal Sharma <usharma1998@gmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>

PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-01 09:55:36 -04:00
Refael Ackermann
46eb532a2a build: delegate building from Makefile to ninja
PR-URL: https://github.com/nodejs/node/pull/27504
Refs: https://mobile.twitter.com/refack/status/1118484079077482498
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-05-02 21:03:53 -04:00
Steven R. Loomis
d04b376717 build: allow icu download to use other hashes besides md5
- ICU uses sha512 instead of md5 in some recent releases
- Use hashlib.algorithms_guaranteed to choose the following algorithms:
    sha1 sha224 sha384 sha256 sha512 md5
- No preference as to the priority of the algorithms
- This commit does not change the hash used for ICU.

Fixes: https://github.com/nodejs/node/issues/27369
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-by: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-by: Richard Lau <riclau@uk.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/27370
2019-04-26 08:24:04 -07:00
Joyee Cheung
a41a4ee61b
build: disable custom v8 snapshot by default
This currently breaks `test/pummel/test-hash-seed.js`

PR-URL: https://github.com/nodejs/node/pull/27365
Refs: https://github.com/nodejs/node/pull/27321
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-04-24 00:56:23 +08:00
Refael Ackermann
5aaf666b3b build: improve embedded code-cache detection
PR-URL: https://github.com/nodejs/node/pull/27311
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-04-22 14:48:50 -04:00
Refael Ackermann
14df42fd00 build: run mkcodecache as an action
* fix test-code-cache (for the common cases)
* deprecate `configure --code-cache-path`

PR-URL: https://github.com/nodejs/node/pull/27161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-04-16 18:25:04 -04:00
Refael Ackermann
1fc4255221 tools: python: ignore instead of select flake8 rules
PR-URL: https://github.com/nodejs/node/pull/25614
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-04-13 20:33:06 -04:00
Refael Ackermann
25df3c10f4 build,win: put all compilation artifacts into out
* Add symlink from Release to out\Release for backward compat

PR-URL: https://github.com/nodejs/node/pull/27149
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-04-12 14:12:40 -04:00
Richard Lau
b180a15727 build: only emit download ICU warnings once
The check that the user specified `icu` in `--download` only needs to be
done once and not for each entry in `tools/icu/current_ver.dep`.

Fixes: https://github.com/nodejs/node/issues/26860

PR-URL: https://github.com/nodejs/node/pull/27031
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-03 18:55:37 -04:00
Ujjwal Sharma
cc75ba3f14 deps: sync V8 gypfiles with 7.4
Normalized boolean options in the gypfiles for consistency both
internally and with the V8 GN config.

Co-authored-by: Michaël Zasso <targos@protonmail.com>

PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-28 16:36:55 -04:00
Richard Lau
41ba699973 build: update configure for Node.js 12
Update supported level of gcc to 6.3.0 and clang to 8.0.0.

Refs: https://github.com/nodejs/node/pull/26714

PR-URL: https://github.com/nodejs/node/pull/26719
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 00:50:08 -04:00
Rod Vagg
2fa8dc47f3 build: enable v8's siphash for hash seed creation
Triggers the V8_USE_SIPHASH to switch from the internal custom V8
hash seed generation function to an implementation of SipHash. Final
step needed to clear up HashWick.

PR-URL: https://github.com/nodejs/node/pull/26367
Refs: https://github.com/nodejs/node/issues/23259
Refs: https://darksi.de/12.hashwick-v8-vulnerability/
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-03-12 13:10:52 +11:00
Richard Lau
ceb73e714a
build: indicate that configure has done something
If run without `--verbose` configure exits silently with no indication
that it has done anything. Print a message on completion to indicate
that the script has worked.

Refs: https://github.com/nodejs/node/issues/23111

PR-URL: https://github.com/nodejs/node/pull/26436
Refs: https://github.com/nodejs/node/issues/23111
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-07 00:39:39 +01:00
Jon Kunkee
b9aac6766e win,build: scope NASM warning to only x64 and x86
PR-URL: https://github.com/nodejs/node/pull/25995
Reviewed-By: João Reis <reis@janeasystems.com>
2019-03-04 12:25:26 +00:00
Ben Noordhuis
99797cc9cd
build: make 'floating patch' message informational
Downgrade the 'Using floating patch' message that is emitted
when a local patch is applied to the bundled ICU from a warning
to a notice. There isn't anything the user can or should do so
warning isn't appropriate. Instead of angry yellow use soothing green.

Fixes: https://github.com/nodejs/node/issues/26346

PR-URL: https://github.com/nodejs/node/pull/26349
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-02 14:01:47 +01:00
Anna Henningsen
b42dcb0eeb
build: remove v8_typed_array_max_size_in_heap option
This was added in 16f86d6c57, based on
the assumption that otherwise, the memory behind `ArrayBuffer`
instances could be moved around on the heap while native code
holds references to it.

This does not match what V8 actually does (and also did at the time):

- The option/build variable was about always only about TypedArrays,
  not ArrayBuffers. Calls like `new ArrayBuffer(4)` call into C++
  regardless of the option value, but calls like `new Uint8Array(4)`
  would not call into C++ under V8 defaults.
- When first accessing a heap-allocated TypedArray’s `ArrayBuffer`,
  whether that is through the JS `.buffer` getter or the C++
  `ArrayBufferView::Buffer()` function, a copy of the contents is
  created using the ArrayBuffer allocator and stored as the
  (permanent, unmovable) backing store.

As a consequence, the memory returned by `ArrayBuffer::GetContents()`
is not moved around, because it is fixed once the `ArrayBuffer`
object itself first comes into explicit existence in any way.

Removing this build option significantly speeds up creation of typed
arrays from JS:

    $ ./node benchmark/compare.js --new ./node --old ./node-master --runs 10 --filter buffer-creation.js buffers | Rscript benchmark/compare.R
                                                                         confidence improvement accuracy (*)     (**)    (***)
     buffers/buffer-creation.js n=1024 len=10 type='buffer()'                  ***    593.66 %      ±28.64%  ±41.10%  ±60.36%
     buffers/buffer-creation.js n=1024 len=10 type='fast-alloc-fill'           ***    675.42 %      ±90.67% ±130.24% ±191.54%
     buffers/buffer-creation.js n=1024 len=10 type='fast-alloc'                ***    663.55 %      ±58.41%  ±83.87% ±123.29%
     buffers/buffer-creation.js n=1024 len=10 type='fast-allocUnsafe'                   3.10 %       ±9.63%  ±13.22%  ±18.07%
     buffers/buffer-creation.js n=1024 len=10 type='slow-allocUnsafe'                   4.67 %       ±5.55%   ±7.77%  ±10.97%
     buffers/buffer-creation.js n=1024 len=10 type='slow'                              -2.48 %       ±4.47%   ±6.12%   ±8.34%
     buffers/buffer-creation.js n=1024 len=1024 type='buffer()'                        -1.91 %       ±4.71%   ±6.45%   ±8.79%
     buffers/buffer-creation.js n=1024 len=1024 type='fast-alloc-fill'                 -1.34 %       ±7.53%  ±10.33%  ±14.10%
     buffers/buffer-creation.js n=1024 len=1024 type='fast-alloc'                       0.52 %       ±5.00%   ±6.87%   ±9.40%
     buffers/buffer-creation.js n=1024 len=1024 type='fast-allocUnsafe'                 0.39 %       ±5.65%   ±7.78%  ±10.67%
     buffers/buffer-creation.js n=1024 len=1024 type='slow-allocUnsafe'                -0.13 %       ±5.68%   ±7.83%  ±10.77%
     buffers/buffer-creation.js n=1024 len=1024 type='slow'                            -5.07 %       ±7.15%   ±9.80%  ±13.35%
     buffers/buffer-creation.js n=1024 len=2048 type='buffer()'                         0.57 %       ±2.70%   ±3.74%   ±5.16%
     buffers/buffer-creation.js n=1024 len=2048 type='fast-alloc-fill'                 -1.60 %       ±4.96%   ±6.79%   ±9.25%
     buffers/buffer-creation.js n=1024 len=2048 type='fast-alloc'                       1.29 %       ±3.79%   ±5.20%   ±7.09%
     buffers/buffer-creation.js n=1024 len=2048 type='fast-allocUnsafe'                 2.73 %       ±8.79%  ±12.05%  ±16.41%
     buffers/buffer-creation.js n=1024 len=2048 type='slow-allocUnsafe'                -0.99 %       ±6.27%   ±8.65%  ±11.91%
     buffers/buffer-creation.js n=1024 len=2048 type='slow'                            -5.98 %       ±6.24%   ±8.71%  ±12.20%
     buffers/buffer-creation.js n=1024 len=4096 type='buffer()'                        -1.75 %       ±3.48%   ±4.78%   ±6.56%
     buffers/buffer-creation.js n=1024 len=4096 type='fast-alloc-fill'                 -3.18 %       ±3.97%   ±5.45%   ±7.45%
     buffers/buffer-creation.js n=1024 len=4096 type='fast-alloc'                       2.05 %       ±4.05%   ±5.58%   ±7.65%
     buffers/buffer-creation.js n=1024 len=4096 type='fast-allocUnsafe'                 1.44 %       ±5.51%   ±7.63%  ±10.57%
     buffers/buffer-creation.js n=1024 len=4096 type='slow-allocUnsafe'          *     -4.77 %       ±4.30%   ±5.90%   ±8.06%
     buffers/buffer-creation.js n=1024 len=4096 type='slow'                            -3.31 %       ±6.38%   ±8.86%  ±12.34%
     buffers/buffer-creation.js n=1024 len=8192 type='buffer()'                         0.06 %       ±2.70%   ±3.77%   ±5.31%
     buffers/buffer-creation.js n=1024 len=8192 type='fast-alloc-fill'                 -1.20 %       ±3.30%   ±4.53%   ±6.17%
     buffers/buffer-creation.js n=1024 len=8192 type='fast-alloc'                      -1.46 %       ±2.75%   ±3.84%   ±5.38%
     buffers/buffer-creation.js n=1024 len=8192 type='fast-allocUnsafe'                 1.27 %       ±4.69%   ±6.49%   ±8.98%
     buffers/buffer-creation.js n=1024 len=8192 type='slow-allocUnsafe'                -1.68 %       ±3.30%   ±4.62%   ±6.49%
     buffers/buffer-creation.js n=1024 len=8192 type='slow'                            -2.49 %       ±3.24%   ±4.44%   ±6.07%
     (Re-running the outlier with 30 runs instead of 10:)
     buffers/buffer-creation.js n=1024 len=4096 type='slow-allocUnsafe'                 2.06 %       ±2.39%   ±3.19%   ±4.15%

The performance gains effect are undone once native code accesses
the underlying ArrayBuffer, but then again that a) does not happen for
all TypedArrays, and b) it should also make sense to look into using
`ArrayBufferView::CopyContents()` in some places, which is made
specifically to avoid such a performance impact and allows us to
use the benefits of heap-allocated typed arrays.

Refs: 16f86d6c57
Refs: https://github.com/nodejs/node/pull/2893
Refs: 74178a5682 (commitcomment-13250880)
Refs: http://logs.libuv.org/node-dev/2015-09-15

PR-URL: https://github.com/nodejs/node/pull/26301
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-01 21:57:28 +01:00
Ben Noordhuis
9334e45aa0 build: remove mips support
Upstream V8 is dropping support for mips/mipsel/mips64/mips64el.
This commit removes the build flags from the configure script
and some loose ends from the documentation.

PR-URL: https://github.com/nodejs/node/pull/26192
Fixes: https://github.com/nodejs/node/issues/26179
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-22 05:29:25 +01:00
Refael Ackermann
ff4adab78c build,win: always build with PCH
PR-URL: https://github.com/nodejs/node/pull/25931
Reviewed-By: João Reis <reis@janeasystems.com>
2019-02-14 15:14:46 -05:00
Sakthipriyan Vairamani (thefourtheye)
26f80dcddd build: make configure.py compatible with python 3
This patch replaces the following

1. Usage of `filter` with `None` to remove falsy items.
2. Usage of `map` to create lists. (Replaced with List comprehensions).
3. Dictionary's `iteritems` which is removed in Python 3.

PR-URL: https://github.com/nodejs/node/pull/25580
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-28 08:55:11 +01:00
Gireesh Punathil
4f6797378e src: merge into core
Make node-report part of core runtime because:

1. When enabled, node-report significantly helps root cause various
types of problems, including support issues sent to the various repos
of the Node.js organization.

2. The requirement of explicitly adding the dependency to node-report
in user applications often represents a blocker to adoption.

Major deviation from the module version of the node-report is that the
report is generated in JSON format, as opposed to human readable text.

No new functionalities have been added, changes that are required for
melding it as a built-in capability has been affected on the module
version of node-report (https://github.com/nodejs/node-report)

Co-authored-by: Bidisha Pyne <bidipyne@in.ibm.com>
Co-authored-by: Howard Hellyer <hhellyer@uk.ibm.com>
Co-authored-by: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Co-authored-by: Julian Alimin <dmastag@yahoo.com>
Co-authored-by: Lakshmi Swetha Gopireddy <lakshmigopireddy@in.ibm.com>
Co-authored-by: Manusaporn Treerungroj <m.treerungroj@gmail.com>
Co-authored-by: Michael Dawson <michael_dawson@ca.ibm.com>
Co-authored-by: Richard Chamberlain <richard_chamberlain@uk.ibm.com>
Co-authored-by: Richard Lau <riclau@uk.ibm.com>
Co-authored-by: Sam Roberts <vieuxtech@gmail.com>
Co-authored-by: Vipin Menon <vipinmv1@in.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/22712
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <Michael_Dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-01-18 10:34:04 +05:30
Daniel Bevenius
7e7266a803 build: introduce --openssl-is-fips flag
This commit introduces a new configuration flag named
--openssl-is-fips which is intended to be used when linking against
an OpenSSL library that is FIPS compatible.

The motivation for this is that Red Hat Enterprise Linux 8 (RHEL8)
comes with OpenSSL 1.1.1 and includes FIPS support, and we would
like to be able to dynamically link against this version and also have
FIPS features enabled in node, like would be done when statically
linking and using the --openssl-fips flag.

The suggestion here is to introduce a new flag:
$ ./configure --help
...
--openssl-is-fips specifies that the shared OpenSSL version is FIPS
                  compatible

This flag could be used in combination with the shared-openssl flag:
$ ./configure --shared-openssl ---openssl-is-fips

This will enable FIPS support in node and the runtime flags will be
availalbe to enable FIPS (--enable-fips, --force-fips).

PR-URL: https://github.com/nodejs/node/pull/25412
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-17 05:25:36 +01:00
Daniel Bevenius
f9b129ec6b build: add check for empty openssl-fips flag
Currently, when specifying the --openssl-fips flag without any path
, or an empty path, does not generate an error. If a path is specified
then the following error is generated:

ERROR: FIPS is not supported in this version of Node.js

This commit adds a check so that the error is generated even if the
path is empty.

PR-URL: https://github.com/nodejs/node/pull/25391
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-11 05:39:00 +01:00
Anna Henningsen
2cb8f24751
http: switch default parser to llhttp
Refs: https://github.com/nodejs/node/pull/24739
Fixes: https://github.com/nodejs/node/issues/24730

PR-URL: https://github.com/nodejs/node/pull/24870
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-12-09 21:57:39 +01:00
Richard Lau
c3dd0d001a build: fix compiler version detection
Compiler version tuples should be numeric for tuple comparisons
to work.

Also correct check for AIX where the minimum supported GCC is 6.3.0

PR-URL: https://github.com/nodejs/node/pull/24879
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-12-08 15:23:30 -08:00
Anna Henningsen
aa943d098e http: make parser choice a runtime flag
Add a `--http-parser=llhttp` vs `--http-parser=traditional`
command line switch, to make testing and comparing the new
llhttp-based implementation easier.

PR-URL: https://github.com/nodejs/node/pull/24739
Refs: https://github.com/nodejs/node/issues/24730
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-12-06 05:21:36 +01:00
cclauss
278126c4e8 build: use print() function in configure.py
PR-URL: https://github.com/nodejs/node/pull/24484
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-11-19 16:30:52 -05:00
Steven R. Loomis
ed1c40e977 build: check minimum ICU in configure for system-icu
- check the version number coming out of pkg-config

PR-URL: https://github.com/nodejs/node/pull/24255
Fixes: https://github.com/nodejs/node/issues/24253
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-16 23:16:55 -05:00
Ben Noordhuis
4684de6423 build: disable openssl asm on arm64 for now
There is reason to believe the generated assembly isn't working
correctly so let's disable it for now pending further investigation.

PR-URL: https://github.com/nodejs/node/pull/24270
Refs: https://github.com/nodejs/node/issues/23913
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-12 07:29:21 +01:00
Fedor Indutny
d4654d89be deps: introduce llhttp
llhttp is modern, written in human-readable TypeScript, verifiable, and
is very easy to maintain.

See: https://github.com/indutny/llhttp

PR-URL: https://github.com/nodejs/node/pull/24059
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-11-10 17:54:21 -05:00
Refael Ackermann
e9dc1ebb13 build: configure default v8_optimized_debug
Under the assumption that debugging is more often focused on node core
source. This setting compiles V8 with only partial optimizations,
DCHECKS, and debug symbols, so it is still very much debuggable,
but it is much faster.

It does disable SLOW_DCHECKS, but at the advice of the V8 team, those
are more important for deep V8 debugging.

Override is configurable with `./configure --v8-non-optimized-debug`.

PR-URL: https://github.com/nodejs/node/pull/23704
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-10-31 12:12:07 -04:00
Steven R. Loomis
d8f2d27261 tools, icu: actually failover if there are multiple URLs
Building on #23269, if multiple ICU download URLs are present, try the
next one in case of error.

Part of the ICU 63.1 bump, but independent code-wise.
https://github.com/nodejs/node/issues/23244

PR-URL: https://github.com/nodejs/node/pull/23715
Fixes: https://github.com/nodejs/node/issues/22344
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-10-24 08:27:19 -07:00
Steven R. Loomis
d8b6a1d4f6 doc: document and warn if the ICU version is too old
Fixes: https://github.com/nodejs/node/issues/19657

PR-URL: https://github.com/nodejs/node/pull/23766
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-10-23 13:37:48 -07:00
Suresh Srinivas
bf7ed80475 src: initial large page (2M) support
PR-URL: https://github.com/nodejs/node/pull/22079
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-18 17:43:07 -04:00
Refael Ackermann
be346d9d32 tools,icu: read full ICU version info from file
* ATM on every ICU version bump we need to update these data. Reading
  it from a file makes it independant of `configre.py` changes.
* Update guide.

PR-URL: https://github.com/nodejs/node/pull/23269
Refs: https://github.com/nodejs/node/issues/23245
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-11 20:19:50 -04:00
Gus Caplan
fce86849fc tools: remove useless assignment from configure.py
PR-URL: https://github.com/nodejs/node/pull/23200
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-05 05:59:44 +02:00
James M Snell
9d71e6a607 src: deprecate global COUNTER_* and remove perfctr
To support Performance Counters on Windows, a number of
global `COUNTER_` methods were added that are undocumented
and really only intended to be used internally by Node.js.

Unfortunately, the perfctr support apparently hasn't even
worked for quite a while and no one has even complained.

This removes the perfctr support and replaces the global
functions with deprecated non-ops for now, with the intent
of removing those outright in the next major release cycle.

PR-URL: https://github.com/nodejs/node/pull/22485
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2018-09-19 11:07:01 +02:00
Refael Ackermann
62a3f9b029 build: add --verbose to ./configure
PR-URL: https://github.com/nodejs/node/pull/22450
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-07 10:19:42 -04:00
Refael Ackermann
cc9dd0f365 build: move meta-shebang back to configure
PR-URL: https://github.com/nodejs/node/pull/22450
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-07 10:17:52 -04:00
Refael Ackermann
d1c5d18ff6 build: rename configure to configure.py
!Should go with next commit!

* renaming so that IDEs can properly detect this as python
* Add dependency to Makefile

PR-URL: https://github.com/nodejs/node/pull/22450
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-07 10:17:52 -04:00