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 /configure.py | |
parent | 8698dd98bbc53ca8da90697e6fbd04a0d04a9580 (diff) | |
download | node-new-a7ae7aab597a874cb0087e8e333e8f7765ded88c.tar.gz |
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 'configure.py')
-rwxr-xr-x | configure.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.py b/configure.py index 2e7deb5a15..ac26f62916 100755 --- a/configure.py +++ b/configure.py @@ -117,6 +117,11 @@ parser.add_option('--dest-os', choices=valid_os, help='operating system to build for ({0})'.format(', '.join(valid_os))) +parser.add_option('--error-on-warn', + action='store_true', + dest='error_on_warn', + help='Turn compiler warnings into errors for node core sources.') + parser.add_option('--gdb', action='store_true', dest='gdb', @@ -1018,6 +1023,7 @@ def configure_node(o): o['variables']['node_install_npm'] = b(not options.without_npm) o['variables']['debug_node'] = b(options.debug_node) o['default_configuration'] = 'Debug' if options.debug else 'Release' + o['variables']['error_on_warn'] = b(options.error_on_warn) host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc() target_arch = options.dest_cpu or host_arch |