Skip to content

build: look for libnode.so in lib subdirectory #58213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,19 @@ def files(options, action):
link_path = abspath(options.install_path, 'lib/libnode.so')
try_symlink(options, so_name, link_path)
else:
output_lib = 'libnode.' + options.variables.get('shlib_suffix')
action(options, [os.path.join(options.build_dir, output_lib)],
os.path.join(options.variables.get('libdir'), output_lib))
# Ninja and Makefile generators output the library in different directories;
# find out which one we have, and install first found
output_lib_name = 'libnode.' + options.variables.get('shlib_suffix')
output_lib_candidate_paths = [
os.path.join(options.build_dir, output_lib_name),
os.path.join(options.build_dir, "lib", output_lib_name),
]
try:
output_lib = next(filter(os.path.exists, output_lib_candidate_paths))
except StopIteration as not_found:
raise RuntimeError("No libnode.so to install!") from not_found
action(options, [output_lib],
os.path.join(options.variables.get('libdir'), output_lib_name))

action(options, [os.path.join(options.v8_dir, 'tools/gdbinit')], 'share/doc/node/')
action(options, [os.path.join(options.v8_dir, 'tools/lldb_commands.py')], 'share/doc/node/')
Expand Down
Loading