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 <[email protected]> PR-URL: #33357 Refs: #32685 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent f31b262 commit 7d4db35

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

node.gyp

+6
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)