Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 14236ef

Browse filesBrowse files
mhdawsontargos
authored andcommitted
build: add build option suppress_all_error_on_warn
Add an option to suppress cases where warnings are on by default Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #56647 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 60039a2 commit 14236ef
Copy full SHA for 14236ef

File tree

Expand file treeCollapse file tree

3 files changed

+13
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+13
-2
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
'clang%': 0,
2929
'error_on_warn%': 'false',
30+
'suppress_all_error_on_warn%': 'false',
3031

3132
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
3233
'openssl_no_asm%': 0,
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@
149149
default=None,
150150
help='Turn compiler warnings into errors for node core sources.')
151151

152+
parser.add_argument('--suppress-all-error-on-warn',
153+
action='store_true',
154+
dest='suppress_all_error_on_warn',
155+
default=False,
156+
help='Suppress cases where compiler warnings are turned into errors by default.')
157+
152158
parser.add_argument('--gdb',
153159
action='store_true',
154160
dest='gdb',
@@ -1397,7 +1403,10 @@ def configure_node(o):
13971403
o['variables']['node_use_amaro'] = b(not options.without_amaro)
13981404
o['variables']['debug_node'] = b(options.debug_node)
13991405
o['default_configuration'] = 'Debug' if options.debug else 'Release'
1406+
if options.error_on_warn and options.suppress_all_error_on_warn:
1407+
raise Exception('--error_on_warn is incompatible with --suppress_all_error_on_warn.')
14001408
o['variables']['error_on_warn'] = b(options.error_on_warn)
1409+
o['variables']['suppress_all_error_on_warn'] = b(options.suppress_all_error_on_warn)
14011410
o['variables']['use_prefix_to_find_headers'] = b(options.use_prefix_to_find_headers)
14021411

14031412
host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc()
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,6 @@
871871
'openssl_default_cipher_list%': '',
872872
},
873873

874-
'cflags': ['-Werror=unused-result'],
875-
876874
'defines': [
877875
'NODE_ARCH="<(target_arch)"',
878876
'NODE_PLATFORM="<(OS)"',
@@ -893,6 +891,9 @@
893891
'NODE_OPENSSL_DEFAULT_CIPHER_LIST="<(openssl_default_cipher_list)"'
894892
]
895893
}],
894+
[ 'suppress_all_error_on_warn=="false"', {
895+
'cflags': ['-Werror=unused-result'],
896+
}],
896897
[ 'error_on_warn=="true"', {
897898
'cflags': ['-Werror'],
898899
'xcode_settings': {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.