From 3aa515210afaefcf99b3f4ad49239fc5738ef58d Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 11 May 2020 19:42:52 +0100 Subject: [PATCH] build: fix `--error-on-warn` for macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XCode builds on macOS do not appear to inherit the `cflags` setting. Signed-off-by: Richard Lau PR-URL: https://github.com/nodejs/node/pull/33357 Refs: https://github.com/nodejs/node/pull/32685 Reviewed-By: Michael Dawson Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: Anna Henningsen Reviewed-By: Jiawen Geng --- node.gyp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/node.gyp b/node.gyp index 961164ac320..2c1a26c28cc 100644 --- a/node.gyp +++ b/node.gyp @@ -378,6 +378,9 @@ 'conditions': [ [ 'error_on_warn=="true"', { 'cflags': ['-Werror'], + 'xcode_settings': { + 'WARNING_CFLAGS': [ '-Werror' ], + }, }], [ 'node_intermediate_lib_type=="static_library" and ' 'node_shared=="true" and OS=="aix"', { @@ -757,6 +760,9 @@ 'conditions': [ [ 'error_on_warn=="true"', { 'cflags': ['-Werror'], + 'xcode_settings': { + 'WARNING_CFLAGS': [ '-Werror' ], + }, }], [ 'node_builtin_modules_path!=""', { 'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ]