0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

92 Commits

Author SHA1 Message Date
cclauss
e6a58a89cb test: fix Python unittests in ./test and ./tools
Co-authored-by: @patrickhousley

Fixes to Python tests to ensure that the following all pass:
1. __python2 -m pytest ./test ./tools__  # 30 tests pass
2. __python3 -m pytest ./test ./tools__  # 30 tests pass
3. __python2 -m unittest discover -s ./test/tools__  # 1 test passes
4. __python3 -m unittest discover -s ./test/tools__  # 1 test passes
5. __PYTHON=python2 make tooltest__   # 1 test passes
6. __PYTHON=python3 make tooltest__   # 1 test passes

This is a subset of #30033

PR-URL: https://github.com/nodejs/node/pull/30340
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-11-11 10:44:54 +01:00
cclauss
0673dfc0d8 tools: pull xcode_emulation.py from node-gyp
PR-URL: https://github.com/nodejs/node/pull/30272
Fixes: https://github.com/nodejs/node/issues/30129
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-11-06 12:39:48 +03:00
cclauss
9529c6660f tools: fix Python 3 syntax error in mac_tool.py
PR-URL: https://github.com/nodejs/node/pull/30146
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-11-01 09:03:47 +01:00
cclauss
2d8307e199 tools: use print() function in buildbot_run.py
PR-URL: https://github.com/nodejs/node/pull/30148
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-10-31 23:19:21 +01:00
Christian Clauss
db1aab9df6 tools: undefined name opts -> args in gyptest.py
```
./tools/gyp/gyptest.py:61:47: F821 undefined name 'opts'
    extra_path = [os.path.abspath(p) for p in opts.path]
                                              ^
```
`opts.path` is an undefined name in this context while `args.path` is
used on the preceding line and is defined on line 48.  Undefined names
have the potential to raise `NameError` at runtime which will halt the
script.

PR-URL: https://github.com/nodejs/node/pull/30144
Reviewed-By: Michaël Zasso <targos@protonmail.com>
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: Jiawen Geng <technicalcute@gmail.com>
2019-10-31 22:10:40 +01:00
Ben Noordhuis
6f814013f4 build: fix version checks in gyp files
Make `distutils.version.StrictVersion` available as a helper to
gyp expressions so they can do proper version checks and update
the gyp files accordingly.

Caveat emptor: `StrictVersion` does *not* like empty strings so
this commit adds truthiness guards. The helper could deal with
those but I felt it better to make it explicit.

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

PR-URL: https://github.com/nodejs/node/pull/29931
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-10-13 16:20:22 -07:00
Michaël Zasso
8728f8660a
tools: fix GYP MSVS solution generator for 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:19 +02:00
Michaël Zasso
66b953207d
tools: port Python 3 compat patches from node-gyp to gyp
Refs: https://github.com/nodejs/node-gyp/pull/1820
Refs: https://github.com/nodejs/node-gyp/pull/1843

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:08 +02:00
Michaël Zasso
af161f0efb
tools: fix GYP ninja generator for Python 3
PR-URL: https://github.com/nodejs/node/pull/29416
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-09-05 13:53:24 +02:00
Christian Clauss
40060f4e42 gyp: make StringIO work in ninja.py
Allow both Python 2 and 3 to access StringIO.

This fixes `./configure --ninja`, which was broken by
https://github.com/nodejs/node/pull/29371.

See: https://github.com/nodejs/node/pull/29371#issuecomment-527331969

PR-URL: https://github.com/nodejs/node/pull/29414
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-09-03 09:31:14 -07:00
cclauss
020c2eaf4b tools: use 'from io import StringIO' in ninja.py
PR-URL: https://github.com/nodejs/node/pull/29371
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-02 21:01:09 -07:00
David Carlier
8675152f0f build: integrate DragonFlyBSD into gyp build
PR-URL: https://github.com/nodejs/node/pull/29313
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-08-29 06:09:05 +02:00
MattIPv4
6726f567d7 gyp: remove semicolons (Python != JavaScript)
PR-URL: https://github.com/nodejs/node/pull/29228
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-08-22 21:24:39 -07:00
cclauss
99f80604ad tools: fix Python 3 issues in gyp/generator/make.py
PR-URL: https://github.com/nodejs/node/pull/29214
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-21 15:50:09 -07:00
cclauss
3b92998918 gyp: futurize imput.py to prepare for Python 3
PR-URL: https://github.com/nodejs/node/pull/29140
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-08-20 10:24:13 -07:00
Michaël Zasso
4e2d1a1433
build,tools: support building with Visual Studio 2019
Add a `vs2019` option to `vcbuild.bat` to use VS 2019 instead of VS 2017

PR-URL: https://github.com/nodejs/node/pull/28781
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
2019-07-27 11:48:28 +02:00
cclauss
54fcb14467 gyp: cherrypick more Python3 changes from node-gyp
PR-URL: https://github.com/nodejs/node/pull/28563
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-16 10:40:31 -07:00
cclauss
5ebaf703aa gyp: pull Python 3 changes from node/node-gyp
PR-URL: https://github.com/nodejs/node/pull/28573
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-11 09:33:51 -07:00
Refael Ackermann
317b712a52 tools,gyp: introduce MSVS 2019
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:43 -04:00
Jon Kunkee
06c10cdc4c build,win: teach GYP MSVS generator about MARMASM
The toolchain for ARM64 Windows includes support for assembly code, but
with a very different syntax from MASM and NASM. This change teaches
GYP how to emit the right XML tags in VCXPROJ files to support
compiling assembly files with the new tool.

PR-URL: https://github.com/nodejs/node/pull/26020
Refs: https://github.com/nodejs/node/issues/25998
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-11 17:44:10 +01:00
Refael Ackermann
fff922afee deps,build: compute torque_outputs in v8.gyp
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:39:00 -04:00
Bartosz Sosnowski
9920dbcaf3 build, tools, win: add .S files support to GYP
Makes GYP properly handle .S files.

Fixes: https://github.com/nodejs/node-v8/issues/89

PR-URL: https://github.com/nodejs/node/pull/24553
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-29 11:09:03 +01:00
Sakthipriyan Vairamani (thefourtheye)
17a0cd2bab
Revert "tools,gyp: don't force build actions with multiple outputs"
This reverts commit 5d8373a498.

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

PR-URL: https://github.com/nodejs/node/pull/23257
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-04 08:53:49 -07:00
Refael Ackermann
5d8373a498 tools,gyp: don't force build actions with multiple outputs
Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal.
Adding it makes the action run alway, even when there are no changes.
(refack): AFAICT because `*.intermediate` files don't have build rules.

PR-URL: https://github.com/nodejs/node/pull/23156
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-10-02 17:53:14 -04:00
Refael Ackermann
731a72f387 tools,gyp: cosmetic change to GYP make generator outputs
Puts the compilation target upfront for easy reading.

PR-URL: https://github.com/nodejs/node/pull/23156
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-10-02 17:53:14 -04:00
Ujjwal Sharma
16cffb0d48
gyp: muffle xcodebuild warnings
Muffle xcodebuild warnings by introducing an alternative quieter
alternative to GetStdout, called GetStdoutQuiet, and call it selectively
in particularly noisy xcodebuild commands.

Co-authored-by: Gibson Fahnestock <gibfahn@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/21999
Original-PR-URL: https://github.com/nodejs/node-gyp/pull/1370
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-25 04:41:56 +05:30
Ujjwal Sharma
51812ff12b
tools: patch gyp to avoid xcrun errors
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Fixes: https://github.com/nodejs/node/issues/12531

PR-URL: https://github.com/nodejs/node/pull/21520
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-29 20:27:31 +05:30
Rich Trott
a9e70d7d0b tools,gyp: fix regex for version matching
Tool versions can be 10 and higher. Float patch from node-gyp to
accommodate this fact of life.

PR-URL: https://github.com/nodejs/node/pull/21216
Refs: 293092c362
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-08 17:10:34 -07:00
Masashi Hirano
3b1bf0d394
tools: fix "the the" typos in comments
PR-URL: https://github.com/nodejs/node/pull/20716
Fixes: https://github.com/nodejs/node/issues/20682
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-16 09:08:37 +04:00
Rod Vagg
fa9f31a4fd Revert "tools: teach gyp to write an 'all deps' rule"
This reverts commit 920c13203d.

Reverted along with d9b59def7 as this breaks compilation from
downloadable source tarballs.

Ref: https://github.com/nodejs/node/pull/17407
PR-URL: https://github.com/nodejs/node/pull/18287
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-01-25 08:18:42 +11:00
Ben Noordhuis
920c13203d
tools: teach gyp to write an 'all deps' rule
Make GYP write a .deps file in the top-level directory that we can use
in the Makefile to get a proper dependency chain for the `node` target.
Preparatory work for getting rid of recursive make invocations.

PR-URL: https://github.com/nodejs/node/pull/17407
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-01-21 02:19:44 +01:00
Sam Roberts
cbd3708c85
gyp: implement LD/LDXX for ninja and FIPS
The ability to set the link rule is used for FIPS, and needs to set
both the `ld =` and `ldxx =` variables in the ninja build file to link
c++ (node) and c (openssl-cli, etc.) executables.

URL: https://github.com/nodejs/node/pull/14227
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 16:24:37 -04:00
Daniel Bevenius
2550152395
gyp: fix ninja build failure (GYP patch)
Currently the files specified in libraries in node.gyp `cctest` target are
getting a '.lib' extension on windows when generated with ninja.
This commit adds a check to see if a file has a '.obj' extension and in
that case no '.lib' extension will be added.

Also, the LIBS specified in the 'libraries' section are not
being included in the --start-group --end-group section which
means that these libraries will not be searched causing issue
with linkers where the order matters.

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-08-23 16:24:36 -04:00
Daniel Bevenius
e78a79af8c
gyp: enable cctest to use objects (gyp part)
this is a re-base of the gyp part of
6a09a69ec9
after bumping GYP version to
eb296f67da

Original-PR-URL: https://github.com/nodejs/node/pull/11956
Original-Ref: https://github.com/nodejs/node/pull/9163
Original-Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/12450
Reviewed-By: João Reis <reis@janeasystems.com>
2017-08-23 16:24:34 -04:00
Ben Noordhuis
503916a04f
gyp: add compile_commands.json gyp generator
this is a re-base of the gyp part of
3c46bb9931
after bumping GYP version to
eb296f67da

Original-Review-By: James M Snell <jasnell@gmail.com>
Ref: https://github.com/nodejs/node/pull/7986
PR-URL: https://github.com/nodejs/node/pull/12450
Reviewed-By: João Reis <reis@janeasystems.com>
2017-08-23 16:24:33 -04:00
Johan Bergström
4cc78917a8
gyp: inherit parent for *.host
Gyp defaults to gcc/g++ if CC.host/CXX.host is unset. This is not
suitable for environments that only uses the clang toolchain.

Since we already assume that the user will provide clang/clang++
through CC/CXX, lean against it (then drop to gcc/g++).

Also apply the same logic for link/ar for consistency although
it doesn't affect us.

PR-URL: https://github.com/nodejs/node/pull/6173
Fixes: https://github.com/nodejs/node/issues/6152
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-23 16:24:31 -04:00
Shigeki Ohtsu
3debbc7605
gyp: fix gyp to work on MacOSX without XCode
This issue has already submitted to the upstream in
https://code.google.com/p/gyp/issues/detail?id=477
Use this commit until the upstream is to be fixed.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-23 16:24:30 -04:00
Refael Ackermann
327077ce43
tools: update GYP to 324dd166
PR-URL: https://github.com/nodejs/node/pull/14718
Refs: 324dd166b7
Refs: 324dd166b7
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 16:24:28 -04:00
Sam Roberts
a6cec04aaa gyp: implement LD/LDXX for ninja and FIPS
The ability to set the link rule is used for FIPS, and needs to set
both the `ld =` and `ldxx =` variables in the ninja build file to link
c++ (node) and c (openssl-cli, etc.) executables.

URL: https://github.com/nodejs/node/pull/14227
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-17 09:36:23 -07:00
Daniel Bevenius
9fd22bc4d4 build: fix ninja build failure (GYP patch)
Currently the files specified in libraries in node.gyp `cctest` target are
getting a '.lib' extension on windows when generated with ninja.
This commit adds a check to see if a file has a '.obj' extension and in
that case no '.lib' extension will be added.

Also, the LIBS specified in the 'libraries' section are not
being included in the --start-group --end-group section which
means that these libraries will not be searched causing issue
with linkers where the order matters.

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:12:24 -04:00
Daniel Bevenius
d727d5d2cf build: enable cctest to use objects (gyp part)
this is a re-base of the gyp part of
6a09a69ec9
after bumping GYP version to
eb296f67da

Original-PR-URL: https://github.com/nodejs/node/pull/11956
Original-Ref: https://github.com/nodejs/node/pull/9163
Original-Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/12450
Reviewed-By: João Reis <reis@janeasystems.com>
2017-04-18 13:25:09 -04:00
Ben Noordhuis
e6eac853a4 tools: add compile_commands.json gyp generator
this is a re-base of the gyp part of
3c46bb9931
after bumping GYP version to
eb296f67da

Original-Review-By: James M Snell <jasnell@gmail.com>
Ref: https://github.com/nodejs/node/pull/7986
PR-URL: https://github.com/nodejs/node/pull/12450
Reviewed-By: João Reis <reis@janeasystems.com>
2017-04-18 13:23:42 -04:00
Johan Bergström
d7a40a8fd3 gyp: inherit parent for *.host
Gyp defaults to gcc/g++ if CC.host/CXX.host is unset. This is not
suitable for environments that only uses the clang toolchain.

Since we already assume that the user will provide clang/clang++
through CC/CXX, lean against it (then drop to gcc/g++).

Also apply the same logic for link/ar for consistency although
it doesn't affect us.

PR-URL: https://github.com/nodejs/node/pull/6173
Fixes: https://github.com/nodejs/node/issues/6152
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-18 13:22:39 -04:00
Shigeki Ohtsu
e7c3f4a97b tools: fix gyp to work on MacOSX without XCode
This issue has already submitted to the upstream in
https://code.google.com/p/gyp/issues/detail?id=477
Use this commit until the upstream is to be fixed.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-18 13:22:34 -04:00
Refael Ackermann
3a334b1280 tools: update gyp to eb296f6
* [win] Add support for MS VS2017 (via Registry)

REF: eb296f67da
PR-URL: https://github.com/nodejs/node/pull/12450
Reviewed-By: João Reis <reis@janeasystems.com>
2017-04-18 13:22:28 -04: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
Ben Noordhuis
3c46bb9931 tools: add compile_commands.json gyp generator
Add a compile_commands.json generator for use with clang-based tooling.

Pass the (undocumented) -C switch to configure to make it generate the
files in out/Debug and out/Release.

PR-URL: https://github.com/nodejs/node/pull/7986
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-09 22:32:22 +01:00
Stewart Addison
625a2716c6 deps: backport GYP fix to fix AIX shared suffix
Required to support the shared library builds on AIX - this sets the
shared library suffix within GYP to .a instead of .so on AIX
My patch: https://codereview.chromium.org/2492233002/ was landed as
as part of this one which fixed some other (not required, but
included for completeness of the backport) changes:

Ref: https://codereview.chromium.org/2511733005/
2016-11-22 14:20:07 -05:00
Anna Henningsen
5111e789e6
deps: float gyp patch for long filenames
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: https://github.com/nodejs/node/issues/7959
Ref: https://github.com/nodejs/node/issues/7510
PR-URL: https://github.com/nodejs/node/pull/7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-08 22:49:11 +02:00
Johan Bergström
f1294f5bfd
gyp: inherit parent for *.host
Gyp defaults to gcc/g++ if CC.host/CXX.host is unset. This is not
suitable for environments that only uses the clang toolchain.

Since we already assume that the user will provide clang/clang++
through CC/CXX, lean against it (then drop to gcc/g++).

Also apply the same logic for link/ar for consistency although
it doesn't affect us.

PR-URL: https://github.com/nodejs/node/pull/6173
Fixes: https://github.com/nodejs/node/issues/6152
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-24 11:01:21 +10:00