mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
build: search for libnode.so in multiple places
As the actual location of built libnode.so may differ depending on which system was used to orchestrate the build (ninja or make), multiple places should be searched for it's location. PR-URL: https://github.com/nodejs/node/pull/58213 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
parent
5ffcf6bca1
commit
cb88e99bfe
1 changed files with 13 additions and 3 deletions
|
@ -181,9 +181,19 @@ def files(options, action):
|
||||||
link_path = abspath(options.install_path, 'lib/libnode.so')
|
link_path = abspath(options.install_path, 'lib/libnode.so')
|
||||||
try_symlink(options, so_name, link_path)
|
try_symlink(options, so_name, link_path)
|
||||||
else:
|
else:
|
||||||
output_lib = 'libnode.' + options.variables.get('shlib_suffix')
|
# Ninja and Makefile generators output the library in different directories;
|
||||||
action(options, [os.path.join(options.build_dir, output_lib)],
|
# find out which one we have, and install first found
|
||||||
os.path.join(options.variables.get('libdir'), output_lib))
|
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/gdbinit')], 'share/doc/node/')
|
||||||
action(options, [os.path.join(options.v8_dir, 'tools/lldb_commands.py')], 'share/doc/node/')
|
action(options, [os.path.join(options.v8_dir, 'tools/lldb_commands.py')], 'share/doc/node/')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue