Skip to content

Commit 7d4db35

Browse files
richardlaucodebytere
authored andcommitted
build: fix --error-on-warn for macOS
XCode builds on macOS do not appear to inherit the `cflags` setting. Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: #33357 Refs: #32685 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent f31b262 commit 7d4db35

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

node.gyp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@
378378
'conditions': [
379379
[ 'error_on_warn=="true"', {
380380
'cflags': ['-Werror'],
381+
'xcode_settings': {
382+
'WARNING_CFLAGS': [ '-Werror' ],
383+
},
381384
}],
382385
[ 'node_intermediate_lib_type=="static_library" and '
383386
'node_shared=="true" and OS=="aix"', {
@@ -757,6 +760,9 @@
757760
'conditions': [
758761
[ 'error_on_warn=="true"', {
759762
'cflags': ['-Werror'],
763+
'xcode_settings': {
764+
'WARNING_CFLAGS': [ '-Werror' ],
765+
},
760766
}],
761767
[ 'node_builtin_modules_path!=""', {
762768
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ]

0 commit comments

Comments
 (0)