From dfacded93d2210ccf04aaf1484a68a6cb89f8409 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 15 Aug 2025 14:16:59 +0000 Subject: [PATCH] build: do not set `-mminimal-toc` with `clang` This is a gcc-only option, do not pass to clang. --- common.gypi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 686fc122383cb3..adc9fbb3130c26 100644 --- a/common.gypi +++ b/common.gypi @@ -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"', {