Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36.4k
build: turn warnings into errors for node sources#32685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
5e3988d2379516b9fa8f31d0456c9890e67File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -117,6 +117,11 @@ | ||
| 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.') | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be great to have this in the Windows vcbuild.bat also. ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I agree. The problem for me is that I don't have a windows testing environment anymore. At least if this got merged we could enable this for pull requests. | ||
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -375,6 +375,9 @@ | ||
| 'msvs_disabled_warnings!': [4244], | ||
| 'conditions': [ | ||
| [ 'error_on_warn=="true"', { | ||
danbev marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| '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 | ||
| @@ -749,6 +752,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)"' ] | ||
| }], | ||
Uh oh!
There was an error while loading. Please reload this page.