Commit Graph
6 Commits
Author SHA1 Message Date
Abdirahim Musse db9da5d184 build: add weak symbol detection to export script
AIX export files support the `weak` keyword to mark weak symbols.

This helps preserve C++ weak symbol semantics and preventing potential
linker conflicts.

PR-URL: https://github.com/nodejs/node/pull/62656
Refs: https://www.ibm.com/docs/en/aix/7.2.0?topic=l-ld-command#ld__a3119106d
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2026-04-16 13:24:44 +00:00
Abdirahim Musse 263ebf0e35 build: filter hidden visibility symbols on AIX
Without these changes we are getting back linker errors
AIX with clang builds:

```text
ld: 0711-407 ERROR: Symbol [SYMBOL_NAME]
        Visibility is not allowed on a reference to an imported symbol.
```

Not including hidden symbols in the export files matches the
recomendation by XLC documentation:

> When using export lists, it is not recommended to put symbols with
> hidden visibility in the lists.

PR-URL: https://github.com/nodejs/node/pull/62656
Refs: https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.4?topic=libraries-symbol-exports-visibilities
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2026-04-16 13:24:43 +00:00
Antoine du Hamel 0e96dc1f95 tools: lint shell scripts
PR-URL: https://github.com/nodejs/node/pull/36099
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-12-16 23:45:26 +01:00
Richard Lau 4804a18812 build: tidy up comments in create_expfile.sh
Fixes spelling, adds punctuation and rewords some sentences for
readability in the comments of `tools/create_expfile.sh`.

PR-URL: https://github.com/nodejs/node/pull/26220
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-22 12:42:32 -05:00
Michael Dawson 1657f12f75 build: fix dependencies on AIX
Addon tests were still starting to run before the node exp file
creation was complete.

- remove process_outputs_as_sources as it did not fix the
  problem
- update create_expfile.sh so that exp file is created in a
  temporary file and then renamed to final name so that
  file is only visible once it is complete
- update target used in building Addons so that for
  AIX it depends on the exp file being available

PR-URL: https://github.com/nodejs/node/pull/8285
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-08-29 16:20:18 -04:00
Michael Dawson 15bcbf853e build: Updates for AIX npm support - part 1
This PR is the first step enabling support for native modules
for AIX.  The main issue is that unlike linux where all
symbols within the Node executable are available to the shared
library for a native module (npm), on AIX the symbols must
be explicitly exported.  In addition, when the shared library is
built it must be linked using a list of the available symbols.

This patch covers the changes need to:

 1) Export the symbols when building the node executable
 2) Generate the file listing the symbols that can be used when
    building the shared library.

For AIX, it breaks the build process into 2 steps.  The first builds
a static library and then generates a node.exp file which contains
the symbols from that library.  The second builds the node executable
and uses the node.exp file to specify which symbols should be
exported.  In addition, it save the node.exp file so that it can
later be used in the creation of the shared library when building
a native module.

The following additional steps will be required in dependent projects
to fully enable AIX for native modules and are being worked
separately:

 - Updates to node-gyp to use node.exp when creating the
   shared library for a native module
 - Fixes to gyp related to copying files as covered in
      https://codereview.chromium.org/1368133002/patch/1/10001
 - Pulling in updated gyp versions to Node and node-gyp
 - Pulling latest libuv

These changes were done to minimize the change to other platforms
by working within the existing structure to add the 2 step process
for AIX without changing the process for other platforms.

PR-URL: https://github.com/nodejs/node/pull/3114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-23 10:43:02 -04:00