Skip to content

Commit 4a4cc1e

Browse files
authored
build: deprecate always enabled --enable-static
`libnode.a` is now always produced, unless configured with flag `--shared`. This deprecates the no-op flag `--enable-static`. Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net> PR-URL: #65103 Refs: #65026 Refs: #63626 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent ad34321 commit 4a4cc1e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

configure.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@
11071107
action='store_true',
11081108
dest='enable_static',
11091109
default=None,
1110-
help='build as static library')
1110+
help=argparse.SUPPRESS) # Deprecated
11111111

11121112
parser.add_argument('--no-browser-globals',
11131113
action='store_true',
@@ -2081,9 +2081,6 @@ def configure_node(o):
20812081
if options.v8_options:
20822082
o['variables']['node_v8_options'] = options.v8_options.replace('"', '\\"')
20832083

2084-
if options.enable_static:
2085-
o['variables']['node_target_type'] = 'static_library'
2086-
20872084
o['variables']['node_debug_lib'] = b(options.node_debug_lib)
20882085

20892086
if options.debug_nghttp2:
@@ -2126,10 +2123,13 @@ def configure_node(o):
21262123
else:
21272124
o['variables']['coverage'] = 'false'
21282125

2126+
if options.enable_static and options.shared:
2127+
error('--enable-static must not be set with --shared')
2128+
if options.enable_static:
2129+
warn('--enable-static is deprecated and libnode.a is always produced')
2130+
21292131
if options.shared:
21302132
o['variables']['node_target_type'] = 'shared_library'
2131-
elif options.enable_static:
2132-
o['variables']['node_target_type'] = 'static_library'
21332133
else:
21342134
o['variables']['node_target_type'] = 'executable'
21352135

0 commit comments

Comments
 (0)