Commit graph

37 commits

Author SHA1 Message Date
Gaby Baghdadi
7d0c83d2a9
feat: support IBM Open XL C/C++ on z/OS (#2743) 2022-10-08 10:50:05 +08:00
Kevin Adler
a26494fbb8 feat: Add proper support for IBM i
Python 3.9 on IBM i now properly returns "os400" for sys.platform
instead of claiming to be AIX as it did previously. While the IBM i PASE
environment is compatible with AIX, it is a subset and has numerous
differences which makes it beneficial to distinguish, however this means
that it now needs explicit support here.
2022-09-24 02:17:10 +01:00
Shelley Vohr
e18a61afc1
build: shrink bloated addon binaries on windows
PR-URL: https://github.com/nodejs/node-gyp/pull/2060
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2020-03-13 12:38:16 +11:00
Ben Noordhuis
0878db3b81
Revert "build,test: add duplicate symbol test"
This reverts commit 2761afbf73.

Building with `-fvisibility=hidden` breaks some of Node's add-on tests
and therefore likely also affects third-party add-ons. This change was
landed in a patch release so I'm opting to revert it until the next
major release.

PR-URL: https://github.com/nodejs/node-gyp/pull/1828
Refs: https://github.com/nodejs/node/pull/28647#issuecomment-511715968
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-07-17 14:29:16 +10:00
Shuowang (Wayne) Zhang
dd9bf929ac
zos: update compiler options
PR-URL: https://github.com/nodejs/node-gyp/pull/1768
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-06-21 12:24:21 +10:00
Gabriel Schulhof
2761afbf73
build,test: add duplicate symbol test
On OSX symbols are exported by default, and they overlap if two
different copies of the same symbol appear in a process. This change
ensures that, on OSX, symbols are hidden by default.

Re: https://github.com/nodejs/node-addon-api/pull/456
Fixes: https://github.com/nodejs/node/issues/26765
PR-URL: https://github.com/nodejs/node-gyp/pull/1689
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-06-21 12:24:21 +10:00
Andy Dill
d3b21220a0
win: fix delay-load hook for electron 4
PR-URL: nodejs#1566
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:29:00 +10:00
Jens
6f5a408934
tools: fix usage of inherited -fPIC and -fPIE
PR-URL: https://github.com/nodejs/node-gyp/pull/1340
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-24 10:29:00 +10:00
Richard Lau
1e203c5148 Fix include path when pointing to Node.js source
Header files for deps are in a different location in the Node.js
source tree compared to the release tarballs.

PR-URL: https://github.com/nodejs/node-gyp/pull/1055
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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
Pavel Medvedev
386746c7d1 configure: use full path in node_lib_file GYP var
Set path to node lib in `$(Configuration)` dir when `--nodedir` option
is supplied, otherwise use value of `target_arch` variable.

PR-URL: https://github.com/nodejs/node-gyp/pull/964
Reviewed-By: João Reis <reis@janeasystems.com>
2017-05-15 23:12:46 +01:00
Pavel Medvedev
0913b2dd99 build, win: use target_arch to link with node.lib
Using `target_arch` in addon.gypi to link against Node.js library. This
variable was written into build/config.gypi on the `configure` stage.

Do not copy node.lib into node_root_dir/Release or node_root_dir/Debug
on Windows, link it from node_root_dir/target_arch directory.

PR-URL: https://github.com/nodejs/node-gyp/pull/964
Reviewed-By: João Reis <reis@janeasystems.com>
2017-05-15 23:04:18 +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
Ben Noordhuis
cc778e9215 Override BUILDING_UV_SHARED, BUILDING_V8_SHARED.
We were inheriting BUILDING_UV_SHARED and BUILDING_V8_SHARED from
the common.gypi from the node.js source tree.  Override them with
USING_UV_SHARED and USING_V8_SHARED so symbols get tagged with
`__declspec(dllimport)` instead of `__declspec(dllexport)`, which
is the desired attribute when building add-ons.

Fixes: https://github.com/nodejs/node-gyp/issues/914
PR-URL: https://github.com/nodejs/node-gyp/pull/915
Reviewed-By: Benjamin Byholm <bbyholm@abo.fi>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-06-16 10:50:49 +02:00
Alexis Campailla
f31482e226 win: work around __pfnDliNotifyHook2 type change
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const.
The decltype specifier makes the declaration work across all supported
versions of VS. It also requires that the source be compiled as C++.

Fixes: https://github.com/nodejs/node-gyp/issues/949

PR-URL: https://github.com/nodejs/node-gyp/pull/952
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-06-13 15:55:30 +02:00
Matt Loring
15fd56be3d Enable V8 deprecation warnings for native modules
It will be helpful for native module developers to be aware of any
deprecated apis they are using so that they can update before their
modules break completely. Module developers can override this option
in their binding.gyp if they do not want to see these warnings.

PR-URL: https://github.com/nodejs/node-gyp/pull/920
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-30 11:27:05 +02:00
Marcin Cieślak
07371e5812 Use -fPIC for NetBSD.
Fixes: https://github.com/sass/node-sass/issues/1334
PR-URL: https://github.com/nodejs/node-gyp/pull/856
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-01-08 20:20:15 +01:00
Michael Dawson
9bfa0876b4 Add support for AIX
For AIX we need to use gmake.

For AIX we need to set up the path to the exp file which contains the
symbols needed for linking.  The file will either be in one of the
following depeding on whether are are in installed or development
environment:

  - the include/node directory
  - the out/Release directory

PR-URL: https://github.com/nodejs/node-gyp/pull/753
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-11-18 18:23:36 +01:00
Rod Vagg
9e9df66a06 use process.release, make aware of io.js & node v4 differences
PR-URL: https://github.com/nodejs/node-gyp/pull/711
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-08 09:59:31 +10:00
Jeremiah Senkpiel
bbedb8868b win: enable delay-load hook by default
Enables the following commit by default:
52ceec3a6d

See also:
3bda6cbfa4

PR-URL: https://github.com/nodejs/node-gyp/pull/708
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-09-05 13:18:43 +10:00
Yonggang Luo
9a2637e8d8 Setting NODE_GYP_DIR for addon.gypi to setting absolute path for src/win_delay_load_hook.c,
and fixes of the long relative path issue on Win32.
Fixes of #636
2015-05-31 09:36:35 +08:00
Nathan Rajlich
be4ea598dd addon: whitespace tweaks 2015-05-24 15:01:22 -07:00
Nathan Rajlich
ad336cce6e Merge pull request #541 from agnat/feature/define_target_name
Add target name preprocessor define
2015-05-24 14:58:23 -07:00
Konstantin Käfer
d41cb6356e Only add "-undefined dynamic_lookup" to loadable_module targets
Adding "-undefined dynamic_lookup" to all targets makes it impossible to create Xcode projects with node-gyp for gyp files that also include "none" targets. Since non-targets don't have a framework phase, gyp errors when trying to add the link flag.

In addition, "-undefined dynamic_lookup" should be added as a linker flag, not a link library, so it's now passed in the "OTHER_LDFLAGS" setting
2015-04-17 12:57:18 +02:00
Bert Belder
52ceec3a6d win: optionally allow node.exe/iojs.exe to be renamed
On Windows, when node or io.js attempts to dynamically load a compiled
addon, the compiled addon tries to load node.exe or iojs.exe again -
depending on which import library the module used when it was linked.
This causes many compiled addons to break when node.exe or iojs.exe are
renamed, because when the binary has been renamed the addon DLL can't
find the (right) .exe file to load its imports from.

This patch gives compiled addon developers an option to overcome this
restriction by compiling a delay-load hook into their binary. The
delay-load hook ensures that whenever a module tries to load imports
from node.exe/iojs.exe, it'll just look at the process image, thereby
making the addon work regardless of what name the node/iojs binary has.

To enable this feature, the addon developer must set the
'win_delay_load_hook' option to 'true' in their binding.gyp file, like
this:

```
{
  'targets': [
    {
      'target_name': 'ernie',
      'win_delay_load_hook': 'true',
      ...
```

Bug: https://github.com/iojs/io.js/issues/751
Bug: https://github.com/iojs/io.js/issues/965
2015-03-30 14:51:49 -07:00
David Siegel
9ceb83862f Add target name preprocessor define
Adds the name of the current target as a preprocessor define. Uses the automatic variable _target_name in combination with late expansion.
2014-11-30 13:02:30 +01:00
Ferdinand Prantl
b6baca7912 Fix build on Windows 2003 Server with MSVC 2008
Use quotation marks to encapsulate the path to node.lib.
Use ConfigurationName instead of Configuration for the
variable getting the Debug/Release directory.
2014-01-20 19:39:38 +01:00
Nathan Rajlich
e9609e2cf3 addon.gypi: attempt to properly link to the default Windows libraries 2013-08-01 09:36:43 -07:00
Nathan Rajlich
d2eb3094b1 addon.gypi: link to the default Windows libraries
Fixes joyent/node#5947.
2013-08-01 09:21:28 -07:00
Nathan Rajlich
078ab27480 disable "thin" static libraries by default
Older linkers don't have the -T flag.

This is a somewhat experimental feature, so if user's want "thin"
archives, they can specify `--thin` to revert to the original behavior.
2013-03-08 15:42:19 -08:00
Nathan Rajlich
019a78369c addon.gypi: define _LARGEFILE_SOURCE, _FILE_OFFSET_BITS
Since as of joyent/node@83e5e20c2c, these are no
longer defined in node's commong.gypi file, so we need to define them here as
well.
2013-01-20 12:14:35 -08:00
Nathan Rajlich
bae7580ff8 use @rpath instead of @loader_path
See: http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/
2012-11-13 16:38:29 -08:00
Nathan Rajlich
d38446448b addon.gypi: define "BUILDING_NODE_EXTENSION"
This makes building on Windows use "dllimport" instead of "dllexport".
2012-10-30 15:48:05 -07:00
Nathan Rajlich
5c3eb824aa addon.gypi: make the -install_name use "@loader_path"
This seems more appropriate for how node native addons are build, such that
you don't actually know where the addon will reside when installed. Before,
addons would get "/usr/local/lib/binding.node" hard-coded into their load-path
and that is just plain wrong.

Still need to look into if this is necessary for other Unix platforms than OS X.
2012-10-04 12:28:46 -07:00
Nathan Rajlich
5c8116b52f addon.gypi: only set "product_extension" for loadable_modules
This way, when a native module depends on a static library through gyp, then
it will have the platform-appropriate suffix (i.e. ".a" or ".lib").
Same goes for "shared_library" types and others as well.
2012-10-04 12:27:02 -07:00
Nathan Rajlich
8d224605a2 addon.gypi: disable MSVC C4251 warnings 2012-08-16 15:34:18 -07:00
Nathan Rajlich
d770292b99 configure: port the gyp_addon login into the "configure" step
Now `tools/gyp_addon` can be removed from the node repo.
Part of joyent/node#3760.
2012-08-12 14:27:59 -07:00