Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'nodejs/master' into xplat
Browse files Browse the repository at this point in the history
Merge nodejs/node@348cc80
as of 2017-03-23

PR-URL: #198
Signed-off-by: Hitesh Kanwathirtha <[email protected]>
  • Loading branch information
kunalspathak committed Mar 24, 2017
2 parents e170da8 + 348cc80 commit 491475d
Show file tree
Hide file tree
Showing 389 changed files with 4,915 additions and 12,819 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ rules:
key-spacing: [2, {mode: minimum}]
keyword-spacing: 2
linebreak-style: [2, unix]
max-len: [2, 80, 2]
max-len: [2, {code: 80, ignoreUrls: true, tabWidth: 2}]
new-parens: 2
no-mixed-spaces-and-tabs: 2
no-multiple-empty-lines: [2, {max: 2, maxEOF: 0, maxBOF: 0}]
Expand Down
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ San-Tai Hsu <[email protected]>
Scott Blomquist <[email protected]> <[email protected]>
Sergey Kryzhanovsky <[email protected]> <[email protected]>
Shannen Saez <[email protected]>
Shigeki Ohtsu <[email protected]> <[email protected]>
Shigeki Ohtsu <[email protected]> <[email protected]> <[email protected]>
Siddharth Mahendraker <[email protected]> <[email protected]>
Simon Willison <[email protected]>
Stanislav Opichal <[email protected]>
Expand Down
80 changes: 74 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,86 @@ If you consistently can reproduce a test failure, search for it in the
[Node.js issue tracker](https://github.com/nodejs/node/issues) or
file a new issue.

## Supported platforms

This list of supported platforms is current as of the branch / release to
which it is attached.

### Input

Node.js relies on V8 and libuv. Therefore, we adopt a subset of their
supported platforms.

### Strategy

Support is divided into three tiers:

* **Tier 1**: Full test coverage and maintenance by the Node.js core team and
the broader community.
* **Tier 2**: Full test coverage but more limited maintenance,
often provided by the vendor of the platform.
* **Experimental**: Known to compile but not necessarily reliably or with
a full passing test suite. These are often working to be promoted to Tier
2 but are not quite ready. There is at least one individual actively
providing maintenance and the team is striving to broaden quality and
reliability of support.

### Supported platforms

| System | Support type | Version | Architectures | Notes |
|--------------|--------------|----------------------------------|----------------------|------------------|
| GNU/Linux | Tier 1 | kernel >= 2.6.18, glibc >= 2.5 | x86, x64, arm, arm64 | |
| macOS | Tier 1 | >= 10.10 | x64 | |
| Windows | Tier 1 | >= Windows 7 or >= Windows2008R2 | x86, x64 | |
| SmartOS | Tier 2 | >= 15 < 16.4 | x86, x64 | see note1 |
| FreeBSD | Tier 2 | >= 10 | x64 | |
| GNU/Linux | Tier 2 | kernel >= 4.2.0, glibc >= 2.19 | ppc64be | |
| GNU/Linux | Tier 2 | kernel >= 3.13.0, glibc >= 2.19 | ppc64le | |
| AIX | Tier 2 | >= 6.1 TL09 | ppc64be | |
| GNU/Linux | Tier 2 | kernel >= 3.10, glibc >= 2.17 | s390x | |
| macOS | Experimental | >= 10.8 < 10.10 | x64 | no test coverage |
| Linux (musl) | Experimental | musl >= 1.0 | x64 | |

note1 - The gcc4.8-libs package needs to be installed, because node
binaries have been built with GCC 4.8, for which runtime libraries are not
installed by default. For these node versions, the recommended binaries
are the ones available in pkgsrc, not the one available from nodejs.org.
Note that the binaries downloaded from the pkgsrc repositories are not
officially supported by the Node.js project, and instead are supported
by Joyent. SmartOS images >= 16.4 are not supported because
GCC 4.8 runtime libraries are not available in their pkgsrc repository

### Supported toolchains

Depending on host platform, the selection of toolchains may vary.

#### Unix

* GCC 4.8.5 or newer
* Clang 3.4.1 or newer

#### Windows

* Building Node: Visual Studio 2015 or Visual C++ Build Tools 2015 or newer
* Building native add-ons: Visual Studio 2013 or Visual C++ Build Tools 2015
or newer

## Building Node.js on supported platforms

### Unix / OS X

Prerequisites:

* `gcc` and `g++` 4.8.5 or newer, or
* `clang` and `clang++` 3.4 or newer
* `clang` and `clang++` 3.4.1 or newer
* Python 2.6 or 2.7
* GNU Make 3.81 or newer

On OS X, you will also need:
* [Xcode](https://developer.apple.com/xcode/download/)
* You also need to install the `Command Line Tools` via Xcode. You can find
- You also need to install the `Command Line Tools` via Xcode. You can find
this under the menu `Xcode -> Preferences -> Downloads`
* This step will install `gcc` and the related toolchain containing `make`
- This step will install `gcc` and the related toolchain containing `make`

* After building, you may want to setup [firewall rules](tools/macosx-firewall.sh)
to avoid popups asking to accept incoming network connections when running tests:
Expand Down Expand Up @@ -51,7 +116,8 @@ the `-j4` flag. See the
[GNU Make Documentation](https://www.gnu.org/software/make/manual/html_node/Parallel.html)
for more information.

Note that the above requires that `python` resolve to Python 2.6 or 2.7 and not a newer version.
Note that the above requires that `python` resolve to Python 2.6 or 2.7
and not a newer version.

To run the tests:

Expand Down Expand Up @@ -252,9 +318,11 @@ It is possible to build Node.js with

**Note**: building in this way does **not** allow you to claim that the
runtime is FIPS 140-2 validated. Instead you can indicate that the runtime
uses a validated module. See the [security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf)
uses a validated module. See the
[security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf)
page 60 for more details. In addition, the validation for the underlying module
is only valid if it is deployed in accordance with its [security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf).
is only valid if it is deployed in accordance with its
[security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf).
If you need FIPS validated cryptography it is recommended that you read both
the [security policy](http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf)
and [user guide](https://openssl.org/docs/fips/UserGuide-2.0.pdf).
Expand Down
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V7.md#7.7.3">7.7.3</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V7.md#7.7.4">7.7.4</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.3">7.7.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.2">7.7.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.1">7.7.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.0">7.7.0</a><br/>
Expand All @@ -42,7 +43,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V7.md#7.0.0">7.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.10.0">6.10.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.10.1">6.10.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.10.0">6.10.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.9.5">6.9.5</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.9.4">6.9.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.9.3">6.9.3</a><br/>
Expand Down Expand Up @@ -84,7 +86,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V5.md#5.0.0">5.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V4.md#4.8.0">4.8.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V4.md#4.8.1">4.8.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V4.md#4.8.0">4.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V4.md#4.7.3">4.7.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V4.md#4.7.2">4.7.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V4.md#4.7.1">4.7.1</a><br/>
Expand Down
25 changes: 19 additions & 6 deletions android-configure
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,26 @@ case $ARCH in
;;
esac

NDK_PATH=$1
function make_toolchain {
$NDK_PATH/build/tools/make-standalone-toolchain.sh \
--toolchain=$TOOLCHAIN_NAME-$CC_VER \
--arch=$ARCH \
--install-dir=$TOOLCHAIN \
--platform=android-21
}

export TOOLCHAIN=$PWD/android-toolchain
mkdir -p $TOOLCHAIN
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=$TOOLCHAIN_NAME-$CC_VER \
--arch=$ARCH \
--install-dir=$TOOLCHAIN \
--platform=android-21
if [ -d "$TOOLCHAIN" ]; then
read -r -p "NDK toolchain already exists. Replace it? [y/N]" response
case "$response" in
[Yy])
rm -rf "$TOOLCHAIN"
make_toolchain
esac
else
make_toolchain
fi
export PATH=$TOOLCHAIN/bin:$PATH
export AR=$TOOLCHAIN/bin/$SUFFIX-ar
export CC=$TOOLCHAIN/bin/$SUFFIX-gcc
Expand Down
2 changes: 1 addition & 1 deletion benchmark/_benchmark_progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class BenchmarkProgress {
`| ${fraction(completedFiles, scheduledFiles)} files ` +
`| ${fraction(completedRunsForFile, runsPerFile)} runs ` +
`| ${fraction(completedConfig, scheduledConfig)} configs]` +
`: ${caption}`;
`: ${caption} `;
}

updateProgress(finished) {
Expand Down
15 changes: 9 additions & 6 deletions benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Benchmark(fn, configs, options) {
}

Benchmark.prototype._parseArgs = function(argv, configs) {
const cliOptions = Object.assign({}, configs);
const cliOptions = {};
const extraOptions = {};
// Parse configuration arguments
for (const arg of argv) {
Expand All @@ -47,17 +47,20 @@ Benchmark.prototype._parseArgs = function(argv, configs) {
console.error('bad argument: ' + arg);
process.exit(1);
}
const config = match[1];

if (configs[match[1]]) {
if (configs[config]) {
// Infer the type from the config object and parse accordingly
const isNumber = typeof configs[match[1]][0] === 'number';
const isNumber = typeof configs[config][0] === 'number';
const value = isNumber ? +match[2] : match[2];
cliOptions[match[1]] = [value];
if (!cliOptions[config])
cliOptions[config] = [];
cliOptions[config].push(value);
} else {
extraOptions[match[1]] = match[2];
extraOptions[config] = match[2];
}
}
return { cli: cliOptions, extra: extraOptions };
return { cli: Object.assign({}, configs, cliOptions), extra: extraOptions };
};

Benchmark.prototype._queue = function(options) {
Expand Down
2 changes: 2 additions & 0 deletions benchmark/fs/bench-realpathSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
const common = require('../common');
const fs = require('fs');
const path = require('path');

process.chdir(__dirname);
const resolved_path = path.resolve(__dirname, '../../lib/');
const relative_path = path.relative(__dirname, '../../lib/');

Expand Down
2 changes: 2 additions & 0 deletions benchmark/module/module-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function main(conf) {
measureFull(n, conf.useCache === 'true');
else
measureDir(n, conf.useCache === 'true');

rmrf(tmpDirectory);
}

function measureFull(n, useCache) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const inputs = require('../fixtures/url-inputs.js').searchParams;
const bench = common.createBenchmark(main, {
type: Object.keys(inputs),
method: ['legacy', 'whatwg'],
n: [1e5]
n: [1e6]
});

function useLegacy(n, input) {
Expand Down
2 changes: 0 additions & 2 deletions benchmark/url/whatwg-url-idna.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ function main(conf) {
const input = inputs[conf.input][to];
const method = to === 'ascii' ? domainToASCII : domainToUnicode;

common.v8ForceOptimization(method, input);

bench.start();
for (var i = 0; i < n; i++) {
method(input);
Expand Down
2 changes: 0 additions & 2 deletions benchmark/vm/run-in-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ function main(conf) {

const contextifiedSandbox = vm.createContext();

common.v8ForceOptimization(vm.runInContext,
'0', contextifiedSandbox, options);
bench.start();
for (; i < n; i++)
vm.runInContext('0', contextifiedSandbox, options);
Expand Down
1 change: 0 additions & 1 deletion benchmark/vm/run-in-this-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function main(conf) {

var i = 0;

common.v8ForceOptimization(vm.runInThisContext, '0', options);
bench.start();
for (; i < n; i++)
vm.runInThisContext('0', options);
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Evan Lucas <[email protected]> <[email protected]>
Evan Lucas <[email protected]> <[email protected]>
Faiq Raza <[email protected]>
Forbes Lindesay <[email protected]>
Forrest L Norvell <[email protected]> <[email protected]>
Forrest L Norvell <[email protected]> <[email protected]> <[email protected]>
Gabriel Barros <[email protected]>
Geoff Flarity <[email protected]> <gflarity@raptvm-x02.(none)>
Gregers Gram Rygg <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions deps/npm/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -446,3 +446,7 @@ Ville Lahdenvuo <[email protected]>
Natalie Wolfe <[email protected]>
Andrew Schmadel <[email protected]>
Jonah Moses <[email protected]>
Daijirō Wachi <[email protected]>
Dmitry Litvinchenko <[email protected]>
chocolateboy <[email protected]>
Henry Zhu <[email protected]>
Loading

0 comments on commit 491475d

Please sign in to comment.