File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 26
26
'uv_library%' : 'static_library' ,
27
27
28
28
'clang%' : 0 ,
29
+ 'error_on_warn%' : '0' ,
29
30
30
31
'openssl_fips%' : '' ,
31
32
'openssl_no_asm%' : 0 ,
219
220
# simply not feasible to squelch all warnings, never mind that the
220
221
# libraries in deps/ are not under our control.
221
222
'conditions' : [
222
- ['_target_name!="<(node_lib_target_name)" or '
223
- '_target_name!="<(node_core_target_name)"' , {
223
+ [ 'error_on_warn=="true" and '
224
+ '(_target_name!="<(node_lib_target_name)" or '
225
+ '_target_name!="<(node_core_target_name)")' , {
224
226
'cflags!' : ['-Werror' ],
225
227
}],
226
228
],
Original file line number Diff line number Diff line change 117
117
choices = valid_os ,
118
118
help = 'operating system to build for ({0})' .format (', ' .join (valid_os )))
119
119
120
+ parser .add_option ('--error-on-warn' ,
121
+ action = 'store_true' ,
122
+ dest = 'error_on_warn' ,
123
+ help = 'Turn compiler warnings into errors for node core sources.' )
124
+
120
125
parser .add_option ('--gdb' ,
121
126
action = 'store_true' ,
122
127
dest = 'gdb' ,
@@ -1018,6 +1023,7 @@ def configure_node(o):
1018
1023
o ['variables' ]['node_install_npm' ] = b (not options .without_npm )
1019
1024
o ['variables' ]['debug_node' ] = b (options .debug_node )
1020
1025
o ['default_configuration' ] = 'Debug' if options .debug else 'Release'
1026
+ o ['variables' ]['error_on_warn' ] = b (options .error_on_warn )
1021
1027
1022
1028
host_arch = host_arch_win () if os .name == 'nt' else host_arch_cc ()
1023
1029
target_arch = options .dest_cpu or host_arch
Original file line number Diff line number Diff line change 346
346
'node.gypi'
347
347
],
348
348
349
- 'cflags' : [ '-Werror' , ],
350
-
351
349
'include_dirs' : [
352
350
'src' ,
353
351
'deps/v8/include'
377
375
'msvs_disabled_warnings!' : [4244 ],
378
376
379
377
'conditions' : [
378
+ [ 'error_on_warn=="true"' , {
379
+ 'cflags' : ['-Werror' ],
380
+ }],
380
381
[ 'node_intermediate_lib_type=="static_library" and '
381
382
'node_shared=="true" and OS=="aix"' , {
382
383
# For AIX, shared lib is linked by static lib and .exp. In the
530
531
'node.gypi' ,
531
532
],
532
533
533
- 'cflags' : [ '-Werror' , ],
534
-
535
534
'include_dirs' : [
536
535
'src' ,
537
536
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
753
752
'msvs_disabled_warnings!' : [4244 ],
754
753
755
754
'conditions' : [
755
+ [ 'error_on_warn=="true"' , {
756
+ 'cflags' : ['-Werror' ],
757
+ }],
756
758
[ 'node_builtin_modules_path!=""' , {
757
759
'defines' : [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ]
758
760
}],
You can’t perform that action at this time.
0 commit comments