Skip to content
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

build: Add --libdir flag to configure #44361

Merged
merged 2 commits into from Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions configure.py
Expand Up @@ -706,6 +706,14 @@
help='compile shared library for embedding node in another project. ' +
'(This mode is not officially supported for regular applications)')

parser.add_argument('--libdir',
action='store',
dest='libdir',
default='lib',
help='a directory to install the shared library into relative to the '
'prefix. This is a no-op if --shared is not specified. ' +
'(This mode is not officially supported for regular applications)')

parser.add_argument('--without-v8-platform',
action='store_true',
dest='without_v8_platform',
Expand Down Expand Up @@ -1323,6 +1331,7 @@ def configure_node(o):
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)

o['variables']['node_shared'] = b(options.shared)
o['variables']['libdir'] = options.libdir
node_module_version = getmoduleversion.get_version()

if options.dest_os == 'android':
Expand Down
4 changes: 2 additions & 2 deletions tools/install.py
Expand Up @@ -169,14 +169,14 @@ def files(action):

# install libnode.version.so
so_name = 'libnode.' + re.sub(r'\.x$', '.so', variables.get('shlib_suffix'))
action([output_prefix + so_name], 'lib/' + so_name)
action([output_prefix + so_name], variables.get('libdir') + '/' + so_name)

# create symlink of libnode.so -> libnode.version.so (C++ addons compat)
link_path = abspath(install_path, 'lib/libnode.so')
try_symlink(so_name, link_path)
else:
output_lib = 'libnode.' + variables.get('shlib_suffix')
action([output_prefix + output_lib], 'lib/' + output_lib)
action([output_prefix + output_lib], variables.get('libdir') + '/' + output_lib)

action(['deps/v8/tools/gdbinit'], 'share/doc/node/')
action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/')
Expand Down