diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-04-06 14:17:57 +0200 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-04-30 06:16:45 +0200 |
commit | a7ae7aab597a874cb0087e8e333e8f7765ded88c (patch) | |
tree | 3f534f6fa874be402de2e6cf372751e29424160f /node.gyp | |
parent | 8698dd98bbc53ca8da90697e6fbd04a0d04a9580 (diff) | |
download | ios-node-v8-a7ae7aab597a874cb0087e8e333e8f7765ded88c.tar.gz ios-node-v8-a7ae7aab597a874cb0087e8e333e8f7765ded88c.tar.bz2 ios-node-v8-a7ae7aab597a874cb0087e8e333e8f7765ded88c.zip |
build: add --error-on-warn configure flag
This commit adds a configuration time flag named error-on-warn:
$ ./configure --help | grep -A1 error-on-warn
--error-on-warn Turn compiler warnings into errors for node core
sources.
The motivation for this is that CI jobs can use this flag to turn
warnings into errors.
PR-URL: https://github.com/nodejs/node/pull/32685
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -376,6 +376,9 @@ 'msvs_disabled_warnings!': [4244], 'conditions': [ + [ 'error_on_warn=="true"', { + 'cflags': ['-Werror'], + }], [ 'node_intermediate_lib_type=="static_library" and ' 'node_shared=="true" and OS=="aix"', { # For AIX, shared lib is linked by static lib and .exp. In the @@ -750,6 +753,9 @@ 'msvs_disabled_warnings!': [4244], 'conditions': [ + [ 'error_on_warn=="true"', { + 'cflags': ['-Werror'], + }], [ 'node_builtin_modules_path!=""', { 'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ] }], |