Commit graph

116 commits

Author SHA1 Message Date
Richard Townsend
91744bfecc gyp: add support for Windows on Arm
Cherry-pick of https://github.com/refack/GYP/pull/33, supersedes
https://github.com/nodejs/node-gyp/pull/1678 until GYP3 is merged.

`npm test` passes

Change-Id: I2b1e1e03e378b4812d34afa527087793864d1576

PR-URL: https://github.com/nodejs/node-gyp/pull/1739
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2019-05-07 16:28:40 +01:00
cclauss
45e3221fd4
Remove an outdated workaround for Python 2.4
PR-URL: https://github.com/nodejs/node-gyp/pull/1650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-04-24 10:29:01 +10:00
Paul Maréchal
a6e0a6c7ed
gyp: move compile_commands_json
It isn't possible to access
`tools/gyp/pylib/gyp/generator/compile_commands_json.py` using the
`--format` option.

This commit moves the file in a place where it can be accessed.

Fixes: https://github.com/nodejs/node-gyp/issues/1526
PR-URL: https://github.com/nodejs/node-gyp/pull/1661
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
2019-04-24 10:29:00 +10:00
cclauss
92e8b52cee
gyp: fix target --> self.target
target is an undefined name in this context.

https://github.com/nodejs/node-gyp/pull/1334
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:29:00 +10:00
cclauss
febdfa2137
gyp: fix sntex error
PR-URL: https://github.com/nodejs/node-gyp/pull/1333
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:29:00 +10:00
Craig Rodrigues
588d333c14
gyp: _winreg module was renamed to winreg in Python 3.
https://github.com/nodejs/node-gyp/pull/1150
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:28:59 +10:00
Craig Rodrigues
98226d198c
gyp: replace basestring with str, but only on Python 3.
On Python 2, basestring is (unicode, str).
On Python 3, basestring and unicode are gone, and there is only str.
2019-04-24 10:28:59 +10:00
Craig Rodrigues
7535e4478e
gyp: replace deprecated functions
* assertEquals() with assertEqual()
* iteritems() with items() for Python 3.
* xrange() with range() for Python 3.

https://github.com/nodejs/node-gyp/pull/1150
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:28:59 +10:00
Craig Rodrigues
2040cd21cc
gyp: use print as a function, as specified in PEP 3105.
https://github.com/nodejs/node-gyp/pull/1150
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:28:59 +10:00
cclauss
abef93ded5
gyp: get ready for python 3
https://github.com/nodejs/node-gyp/pull/1335
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:28:59 +10:00
Daniel Bevenius
94c39c604e 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>
2018-08-09 10:16:53 +10:00
Ujjwal Sharma
e8ea74e0fa 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-08-09 10:16:53 +10:00
Masashi Hirano
ea9aff44f2 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-08-09 10:16:53 +10:00
Sam Roberts
207e5aa4fd 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>
2018-08-09 10:16:53 +10:00
Daniel Bevenius
b416c5f4b7 gyp: enable cctest to use objects (gyp part)
this is a re-base of the gyp part of
6a09a69ec9d36b705e9bde2ac1a193566a702d96
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>
2018-08-09 10:16:53 +10:00
Anna Henningsen
fc3c4e2b10 gyp: 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>
2018-08-09 10:16:53 +10:00
Stewart Addison
8aedbfdef6 gyp: 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:

PR-URL: https://github.com/nodejs/node/pull9675
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Ref: https://codereview.chromium.org/2511733005/
2018-08-09 10:16:53 +10:00
Ben Noordhuis
84cea7b30d Remove unused gyp test scripts.
Shrinks node-gyp's size by about 100 kB.

PR-URL: https://github.com/nodejs/node-gyp/pull/1458
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-06-08 17:28:49 +02:00
Jeff Senn
0540e4ec63 gyp: escape spaces in filenames in make generator
PR-URL: https://github.com/nodejs/node-gyp/pull/1436
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-08 17:09:27 +02:00
Julien Racle
53a5f8ff38 gyp: add support for .mm files to msvs generator
PR-URL: https://github.com/nodejs/node-gyp/pull/1167
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-08 17:09:27 +02:00
John Barboza
dd8561e528 zos: don't use universal-new-lines mode
PR-URL: https://github.com/nodejs/node-gyp/pull/1451
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-06-08 17:09:27 +02:00
Gibson Fahnestock
9425448945 gyp: don't print xcodebuild not found errors
As node-gyp rebuild doesn't seem to need xcodebuild, we don't need to be
printing the error every time GYP is run.

PR-URL: https://github.com/nodejs/node-gyp/pull/1370
Fixes: https://github.com/nodejs/node-gyp/issues/569
Refs: https://github.com/nodejs/node-gyp/pull/1057
Refs: https://chromium-review.googlesource.com/c/492046/
2018-06-08 17:09:27 +02:00
Ben Noordhuis
47496bf6dc Fix IndexError when parsing GYP files.
GYP automatically turns variables ending in _dir, _file or _path into
absolute paths but didn't check for empty strings.

It interacted badly with variables inherited through the environment
from npm, the `scripts-prepend-node-path=false` setting in particular
because it is turned into `npm_config_script_prepend_node_path=`.

Fixes: https://github.com/nodejs/node-gyp/issues/1217
PR-URL: https://github.com/nodejs/node-gyp/pull/1267
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-06-08 17:09:27 +02:00
John Barboza
b2024dee7b zos: support platform
Initial work to add z/OS support to node-gyp.


PR-URL: https://github.com/nodejs/node-gyp/pull/1276
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-08 17:09:27 +02:00
Liu Chao
f27599193a gyp: update xml string encoding conversion
* test: build simple addon in path with non-ascii characters
* test: add test-charmap.py

PR-URL: https://github.com/nodejs/node-gyp/pull/1203
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-06-08 17:09:27 +02:00
Jonas Hermsmeier
40f24e4c2b gyp: fix regex to match multi-digit versions
This fixes the regular expression matching in `xcode_emulation`
to also handle version numbers with multiple-digit major versions
which would otherwise break under use of XCode 10

Fixes: https://github.com/nodejs/node-gyp/issues/1454
PR-URL: https://github.com/nodejs/node-gyp/pull/1455
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-08 09:34:30 +02:00
Kunal Pathak
8a767145c9
gyp: Revert quote_cmd workaround
PR-URL: https://github.com/nodejs/node-gyp/pull/1153
Fixes: https://github.com/nodejs/node-gyp/issues/1151
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-04-23 18:38:07 +01:00
Kunal Pathak
ec5fc36a80 Add support to build node.js with chakracore for ARM.
* Support building node.js with chakracore on Windows on ARM

* Building chakracore for ARM has a dependency on Windows SDK installed
  on the machine. Update python script to populate
  `WindowsSDKDesktopARMSupport` and `WindowsTargetPlatformVersion` for
  ARM builds. This will be using in node repo to build`chakracore.gyp`.

PR-URL: https://github.com/nodejs/node-gyp/pull/873
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-02-15 04:56:46 +01:00
Kunal Pathak
a04ea3051a Add support to build node.js with chakracore.
Microsoft's chakracore engine is dependent on Windows SDK, and build
tools should know the version installed on user machine. This change
adds those dependencies in node-gyp tools. Below is the summary:

* Configure msvs_windows_target_platform_version to use the right
  Windows SDK.

* Configure msvs_use_library_dependency_inputs to export symbols
  correctly (otherwise functions not used by node.exe but might be
  needed by native addon modules could be optimized away by linker).

These changes were originally made in nodejs/node#4765, but as @shigeki
mentioned, it was more sensible to send these changes as PR to node-gyp
repo.

PR-URL: https://github.com/nodejs/node-gyp/pull/873
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-02-15 04:54:20 +01:00
Guy Margalit
05c44944fd Open the build file with universal-newlines mode
To make sure platform specific newlines ('\r\n' or '\r') are converted
to '\n' which otherwise will fail eval().

This should handle multiple issues reported on syntax error reading
binding.gyp (partial list):

https://github.com/nodejs/node-gyp/issues/979
https://github.com/nodejs/node-gyp/issues/199
https://github.com/stephenwvickers/node-net-ping/issues/24
https://github.com/stephenwvickers/node-net-ping/issues/21
https://github.com/mathiask88/node-snap7/issues/11
https://github.com/node-hid/node-hid/issues/28
https://github.com/xdenser/node-firebird-libfbclient/issues/24

PR-URL: https://github.com/nodejs/node-gyp/pull/1053
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-11-16 20:41:26 +01:00
Pavel Medvedev
afc766adf6 Unset executable bit for .bat files
On Windows this bit is not meaningful, on Posix systems such files
should not be executable.

PR-URL: https://github.com/nodejs/node-gyp/pull/969
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ingvar Stepanyan <me@rreverser.com>
2016-10-07 10:46:43 +02:00
Robert Chiras
7f1c1b960c gyp: improvements for android generator
When generating Android.mk files for HOST binaries, we need to specify
the LOCAL_CXX_STL to use when linking.
Also, set the variable GYP_HOST_MULTILIB to 'first'. This is used as
LOCAL_MULTILIB, and since we don't provide flags for both types of
builds (32-bit and 64-bit), the build system will try to build both and
fail.
More details about LOCAL_MULTILIB can be found here:
https://source.android.com/source/64-bit-builds.html

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: https://github.com/nodejs/node-gyp/pull/935
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-19 16:54:10 +02:00
Johan Bergström
625c1515f9 gyp: inherit CC/CXX for CC/CXX.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++).

PR-URL: https://github.com/nodejs/node-gyp/pull/908
Refs: https://github.com/nodejs/node/pull/6173
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-04-28 10:26:10 +02:00
Robert Chiras
a981ef847a gyp: fix android generator
When generating Android .mk files, ready to be used within Android build
system, we don't need LOCAL_SDK_VERSION specified, since the Android
build system already uses the latest one.
By specifying LOCAL_SDK_VERSION in Android makefiles, the build using
Android build system will fail, because the build system won't set the
path to stlport from prebuilts.

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: https://github.com/nodejs/node-gyp/pull/889
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-04 19:07:04 +01:00
Ben Noordhuis
ab89b477c4 Upgrade gyp to b3cef02.
* adds netbsd support: https://codereview.chromium.org/1421073004

* fixes cp(1) use on openbsd: https://codereview.chromium.org/1483473002

Fixes: https://github.com/nodejs/node-gyp/issues/571
Fixes: https://github.com/nodejs/node-gyp/pull/803
PR-URL: https://github.com/nodejs/node-gyp/pull/831
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-12-03 02:33:21 +01:00
Nathan Zadoks
9049241f91 gyp: don't use links at all, just copy the files instead 2015-11-06 09:21:48 +01:00
Nathan Rajlich
8ef90348d1 gyp: apply https://codereview.chromium.org/11361103/ 2015-11-06 09:21:48 +01:00
Nathan Rajlich
a2ed0df84e gyp: always install into $PRODUCT_DIR 2015-11-06 09:21:48 +01:00
Imran Iqbal
cc8b2fa83e Update gyp to b3cef02.
Includes two patches for AIX. Adds support for both 32-bit and 64-bit
files[0] and uses -RPf for cp instead of -af (which is unsupported)[1]

[0] https://codereview.chromium.org/1319663007
[1] https://codereview.chromium.org/1368133002

PR-URL: https://github.com/nodejs/node-gyp/pull/781
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-11-06 09:21:26 +01:00
João Henriques
39a06bc609 gyp: fix for non-acsii userprofile name on Windows
Squashed commit of the following:

commit 9f3a1b2ce62d2a703675b5474797583209602f7d
Author: João Henriques <joaoh88@gmail.com>
Date:   Tue Dec 17 21:14:18 2013 +0000

    Update easy_xml.py

    Better handling of encoding

commit a8b49423f7b477f7b9b363c69886150d9b83acc5
Author: João Henriques <joaoh88@gmail.com>
Date:   Thu Dec 12 04:09:38 2013 +0000

    Quick and dirty fix to allow WriteXmlIfChanged to write xml in utf-8, converting latin-1 directory paths.

Closes #366.
Closes #554.
Fixes #297.
Fixes #404.
Fixes #476.
2015-05-24 15:11:30 -07:00
Nathan Rajlich
9513572a88 gyp: always install into $PRODUCT_DIR 2015-05-24 14:12:55 -07:00
Nathan Rajlich
139a8dd62d gyp: apply https://codereview.chromium.org/11361103/ 2015-05-24 14:12:52 -07:00
Nathan Zadoks
e2158e9fc5 gyp: don't use links at all, just copy the files instead 2015-05-24 14:12:49 -07:00
Nathan Rajlich
b768d20f38 gyp: update gyp to e1c8fcf7
Copied the "tools/gyp" dir over from io.js
commit cb381fe3e08e8a249738f791a984f452ff70c68d.

Includes io.js commits:

 * nodejs/io.js@21f4fb6215
 * nodejs/io.js@15f058f609
 * nodejs/io.js@eb459c8151
 * nodejs/io.js@644ece1f67
2015-05-24 14:02:47 -07:00
Nathan Zadoks
0cd9f08a6d gyp: don't use links at all, just copy the files instead 2014-01-21 12:58:19 -08:00
Nathan Rajlich
511840e821 gyp: apply https://codereview.chromium.org/11361103/ 2014-01-21 12:58:10 -08:00
Nathan Rajlich
9b5e8dc426 gyp: always install into $PRODUCT_DIR 2014-01-21 12:58:04 -08:00
Nathan Rajlich
4815bf1ba5 gyp: update gyp to 1eae492b
Also, fix Python 2.6 builds (joyent/node@a05dae2ced)
2014-01-21 12:56:33 -08:00
Nathan Rajlich
5785bae9b0 xcode_emulation: work in the absence of xcodebuild
OS X systems running only the Command Line Tools for Xcode package,
without the full Xcode, don't have a functioning xcodebuild, but this
isn't mandatory for building many gyp projects (e.g. node.js, v8).
This commit handles xcodebuild failures and avoids populating
Xcode-specific CFLAGS/LDFLAGS when xcodebuild can't be run.

This has been tested on both Xcode and CLT-only systems by successfully
building node.js. The behaviour can be simulated on systems with Xcode
by setting the xcode-select path to something nonsensical, e.g.
xcode-select -switch /usr/bin

BUG=https://code.google.com/p/gyp/issues/detail?id=292
Review URL: https://codereview.chromium.org/102733012/

Patch from mistydemeo@gmail.com!

This was a manual cherry-pick from:

  https://code.google.com/p/gyp/source/detail?r=1819

Fixes #341.
2013-12-18 14:28:08 -08:00
Jay Beavers
e7351e9a56 Merge branch 'master' of https://github.com/TooTallNate/node-gyp into updateGypMSVS 2013-11-11 18:42:38 -08:00