summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2020-04-06 14:17:57 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2020-04-30 06:16:45 +0200
commita7ae7aab597a874cb0087e8e333e8f7765ded88c (patch)
tree3f534f6fa874be402de2e6cf372751e29424160f /node.gyp
parent8698dd98bbc53ca8da90697e6fbd04a0d04a9580 (diff)
downloadios-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.gyp6
1 files changed, 6 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index 2f0f0f152b..3dadad15c9 100644
--- a/node.gyp
+++ b/node.gyp
@@ -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)"' ]
}],