mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
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: https://github.com/nodejs/node/pull/65103 Refs: https://github.com/nodejs/node/issues/65026 Refs: https://github.com/nodejs/node/pull/63626 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
ad3432189c
commit
4a4cc1ed24
1 file changed
+6
-6
+6
-6
@@ -1107,7 +1107,7 @@ parser.add_argument('--enable-static',
|
||||
action='store_true',
|
||||
dest='enable_static',
|
||||
default=None,
|
||||
help='build as static library')
|
||||
help=argparse.SUPPRESS) # Deprecated
|
||||
|
||||
parser.add_argument('--no-browser-globals',
|
||||
action='store_true',
|
||||
@@ -2081,9 +2081,6 @@ def configure_node(o):
|
||||
if options.v8_options:
|
||||
o['variables']['node_v8_options'] = options.v8_options.replace('"', '\\"')
|
||||
|
||||
if options.enable_static:
|
||||
o['variables']['node_target_type'] = 'static_library'
|
||||
|
||||
o['variables']['node_debug_lib'] = b(options.node_debug_lib)
|
||||
|
||||
if options.debug_nghttp2:
|
||||
@@ -2126,10 +2123,13 @@ def configure_node(o):
|
||||
else:
|
||||
o['variables']['coverage'] = 'false'
|
||||
|
||||
if options.enable_static and options.shared:
|
||||
error('--enable-static must not be set with --shared')
|
||||
if options.enable_static:
|
||||
warn('--enable-static is deprecated and libnode.a is always produced')
|
||||
|
||||
if options.shared:
|
||||
o['variables']['node_target_type'] = 'shared_library'
|
||||
elif options.enable_static:
|
||||
o['variables']['node_target_type'] = 'static_library'
|
||||
else:
|
||||
o['variables']['node_target_type'] = 'executable'
|
||||
|
||||
|
||||
Reference in new issue
Block a user