From 94b2fbe0107de36a7688200cc5f607f6793e41d5 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Fri, 7 Aug 2026 10:06:16 -0400 Subject: [PATCH] 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 --- configure.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.py b/configure.py index def52c6fb22f..45b20cb9afee 100755 --- a/configure.py +++ b/configure.py @@ -1107,7 +1107,7 @@ 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'