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/node#48522
Fixes: nodejs/node#42302
Refs: nodejs/node#39069
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
sercher committed Apr 25, 2024
1 parent c2bfac7 commit 37d4ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion graal-nodejs/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,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)
o['variables']['v8_inspector'] = 'false'
Expand Down
4 changes: 4 additions & 0 deletions graal-nodejs/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 @@ -989,6 +992,7 @@
'<@(_outputs)',
'config.gypi',
'<@(deps_files)',
'<@(linked_module_files)',
],
},
],
Expand Down

0 comments on commit 37d4ec7

Please sign in to comment.