You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change overhauls the vendoring & static linking features that the
library exposes, in an attempt to make everything more to the point.
Please refer to the larger discussion [0] for additional context, but in
short: we introduce separate features for vendoring/linking each of the
three system library dependencies: libbpf, libelf, zlib. "static" and
"vendored" meta-features are still available, which apply to all three
libraries in unison. The remaining dependencies are expressed
declaratively via dependent features. E.g., because zlib is only a
dependency of libbpf (and not a direct one), linking it statically
implies linking libbpf statically. In the future, this design would make
it possible to enable additional configurations. For example, currently
vendoring any library implies linking it statically, because we only
build the static version. This is more of a simplification than a strict
requirement and if needed, we could support dynamic linking when using a
vendored copy.
The default features mirror the previous default and no behavior change
should occur. The existing novendor feature is kept but deprecated and
should be removed in the future (a warning will be printed as part of
the build). It was certainly one of the main causes of confusion where
novendor and vendored could co-exist and it was hard to understand what
would or wouldn't happen. In the new world, users are advised to simply
build with all features disabled.
I tested everything on a binary depending on libbpf-sys with various
features enabled and spot checked the expected dynamic library
dependencies. We could enshrine that as a CI step, but given that this
logic is expected to change infrequently I didn't go down that road.
[0] libbpf#64 (comment)
Signed-off-by: Daniel Müller <[email protected]>
0 commit comments