1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

wafsamba: introduce SAMBA_LIBRARY(force_unversioned=False)

This can be used in order to avoid a library to be
catched by --private-libraries=ALL.
It is needed for our wrapper libraries.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-12-29 14:32:02 +00:00
parent 318fd95d5e
commit 533e5daf77

View File

@ -134,6 +134,7 @@ def SAMBA_LIBRARY(bld, libname, source,
require_builtin_deps=False,
provide_builtin_linking=False,
builtin_cflags='',
force_unversioned=False,
allow_undefined_symbols=False,
allow_warnings=False,
enabled=True):
@ -171,9 +172,20 @@ def SAMBA_LIBRARY(bld, libname, source,
raise Errors.WafError("private library '%s' with orig_vscript_map must not have abi_match" %
libname)
if force_unversioned and private_library:
raise Errors.WafError("private library '%s': can't have force_unversioned=True" %
libname)
if force_unversioned and realname is None:
raise Errors.WafError("library '%s': force_unversioned=True needs realname too" %
libname)
if LIB_MUST_BE_PRIVATE(bld, libname) and target_type not in ['PLUGIN']:
private_library = True
if force_unversioned:
private_library = False
if not enabled:
SET_TARGET_TYPE(bld, libname, 'DISABLED')
return
@ -327,7 +339,9 @@ def SAMBA_LIBRARY(bld, libname, source,
vscript = None
if bld.env.HAVE_LD_VERSION_SCRIPT:
if private_library:
if force_unversioned:
version = None
elif private_library:
version = bld.env.PRIVATE_VERSION
elif vnum:
version = "%s_%s" % (libname, vnum)