Skip to content

Commit

Permalink
build: fix configure --link-module
Browse files Browse the repository at this point in the history
Add the list of linked modules to the arguments for `js2c.py`. These
were unintentionally omitted when the build was previously refactored
to avoid command line length limits on Windows.

PR-URL: nodejs#48522
Fixes: nodejs#42302
Refs: nodejs#39069
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
richardlau authored and Ceres6 committed Aug 14, 2023
1 parent b639cca commit 651f37a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ def configure_node(o):
o['variables']['shlib_suffix'] = shlib_suffix

if options.linked_module:
o['variables']['library_files'] = options.linked_module
o['variables']['linked_module_files'] = options.linked_module

o['variables']['asan'] = int(options.enable_asan or 0)

Expand Down
4 changes: 4 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@
'node_lib_target_name%': 'libnode',
'node_intermediate_lib_type%': 'static_library',
'node_builtin_modules_path%': '',
'linked_module_files': [
],
# We list the deps/ files out instead of globbing them in js2c.cc since we
# only include a subset of all the files under these directories.
# The lengths of their file names combined should not exceed the
# Windows command length limit or there would be an error.
# See https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation
'library_files': [
'<@(node_library_files)',
'<@(linked_module_files)',
],
'deps_files': [
'deps/v8/tools/splaytree.mjs',
Expand Down Expand Up @@ -954,6 +957,7 @@
'lib',
'config.gypi',
'<@(deps_files)',
'<@(linked_module_files)',
],
},
],
Expand Down

0 comments on commit 651f37a

Please sign in to comment.