build: do not set -mminimal-toc with clang

This is a gcc-only option, do not pass to clang.

PR-URL: https://github.com/nodejs/node/pull/59484
Refs: https://github.com/nodejs/build/issues/4091
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Richard Lau 2025-08-20 14:55:28 +01:00 committed by GitHub
parent 6c215fb746
commit 70690be494
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -530,7 +530,12 @@
'ldflags': [ '-m64' ],
}],
[ 'host_arch=="ppc64" and OS not in "aix os400"', {
'cflags': [ '-m64', '-mminimal-toc' ],
'conditions': [
[ 'clang==0', {
'cflags': [ '-mminimal-toc' ],
}],
],
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'host_arch=="s390x" and OS=="linux"', {
@ -550,7 +555,12 @@
'ldflags': [ '-m64' ],
}],
[ 'target_arch=="ppc64" and OS not in "aix os400"', {
'cflags': [ '-m64', '-mminimal-toc' ],
'conditions': [
[ 'clang==0', {
'cflags': [ '-mminimal-toc' ],
}],
],
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'target_arch=="s390x" and OS=="linux"', {