Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84d5c4d

Browse files
khardixmarco-ippolito
authored andcommitted
build: search for libnode.so in multiple places
As the actual location of built libnode.so may differ depending on whichsystem was used to orchestrate the build (ninja or make),multiple places should be searched for it's location.PR-URL:#58213Reviewed-By: James M Snell <jasnell@gmail.com>Reviewed-By: Richard Lau <rlau@redhat.com>
1 parentfee082d commit84d5c4d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

‎tools/install.py‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,19 @@ def files(options, action):
181181
link_path=abspath(options.install_path,'lib/libnode.so')
182182
try_symlink(options,so_name,link_path)
183183
else:
184-
output_lib='libnode.'+options.variables.get('shlib_suffix')
185-
action(options, [os.path.join(options.build_dir,output_lib)],
186-
os.path.join(options.variables.get('libdir'),output_lib))
184+
# Ninja and Makefile generators output the library in different directories;
185+
# find out which one we have, and install first found
186+
output_lib_name='libnode.'+options.variables.get('shlib_suffix')
187+
output_lib_candidate_paths= [
188+
os.path.join(options.build_dir,output_lib_name),
189+
os.path.join(options.build_dir,"lib",output_lib_name),
190+
]
191+
try:
192+
output_lib=next(filter(os.path.exists,output_lib_candidate_paths))
193+
exceptStopIterationasnot_found:
194+
raiseRuntimeError("No libnode.so to install!")fromnot_found
195+
action(options, [output_lib],
196+
os.path.join(options.variables.get('libdir'),output_lib_name))
187197

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp