You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
aix: add required changes to build with clang - #62656
AIX header files don't ship declarations for sendmmsg and related functions, despite documentation showing they should be included. This appears to be a bug in AIX header files.
This PR enables building Node.js on AIX with Clang by addressing several issues.
The game plan I have in mind to get AIX building with clang:
Confirm the changes in this PR doesn't break gcc builds (Node.js 24, 22, 20 still use it), then merge this PR
After this PR gets merged, update select compiler to use clang for Node.js 26+ builds
(I have a draft PR for that here: aix: select clang for Node.26+ builds build#4286)
Changes
1. Add conditional flags for Clang builds
Some GCC flags don't work on Clang:
-mfprnd-mno-popcntb-fno-extern-tls-initThese are now conditionally added only when Clang is not enabled.
For Clang builds, we need additional flags:
-fno-integrated-as-fno-xl-pragma-packThese flags are discussed in: https://chromium-review.googlesource.com/c/chromium/src/+/7120638
2. Fix OpenSSL implicit declaration errors
AIX header files don't ship declarations for
sendmmsgand related functions, despite documentation showing they should be included. This appears to be a bug in AIX header files.GCC tolerates implicit function declarations, but Clang 16+ treats them as errors:
https://www.redhat.com/en/blog/new-warnings-and-errors-clang-16
example:
ref: https://ci.nodejs.org/job/node-test-commit-aix/nodes=aix72-power9/62022/consoleFull
For now, we claim to not have these functions. The actual functions are available in libc, so an alternative would be to declare them ourselves for AIX 7.2+.
Ref: https://www.ibm.com/docs/en/aix/7.2.0?topic=s-sendmmsg-subroutine
3. Cherry-pick V8 commit for AIX Clang support
Cherry-picked V8 commit 7107287 which adds required changes to build V8 with Clang on AIX.
Original commit: https://chromium-review.googlesource.com/c/v8/v8/+/7107287
4. Filter hidden visibility symbols from export script
Without filtering HIDDEN symbols, AIX Clang builds fail with linker errors:
Not including hidden symbols in the export files matches the recommendation by XLC documentation:
Ref: https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.4?topic=libraries-symbol-exports-visibilities
5. Add weak symbol detection in create_expfile.sh
AIX export files support the