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: #48522
Fixes: #42302
Refs: #39069
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
richardlau authored and targos committed Oct 27, 2023
1 parent 0e0dd1f commit f2eccb7
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 @@ -1464,7 +1464,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 @@ -29,13 +29,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.py 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 @@ -970,6 +973,7 @@
'<@(_outputs)',
'config.gypi',
'<@(deps_files)',
'<@(linked_module_files)',
],
},
],
Expand Down

0 comments on commit f2eccb7

Please sign in to comment.