public class LinkableListFilterFactory extends Object
LinkableListFilter
which can be used to filter the libraries
which an executable (e.g., binary, shared library, Mach-O bundle) links against.Modifier and Type | Method and Description |
---|---|
static Optional<LinkableListFilter> |
from(CxxBuckConfig cxxBuckConfig,
LinkableCxxConstructorArg linkableArg,
TargetGraph targetGraph)
Convenience method that unpacks a
LinkableCxxConstructorArg and forwards the call. |
static Optional<LinkableListFilter> |
from(CxxBuckConfig cxxBuckConfig,
Optional<String> linkGroup,
com.google.common.collect.ImmutableList<CxxLinkGroupMapping> mapping,
TargetGraph targetGraph)
Creates a
LinkableListFilter based on a link group map and a target graph. |
static java.util.function.Predicate<BuildTarget> |
resourcePredicateFrom(CxxBuckConfig cxxBuckConfig,
Optional<String> resourceGroup,
Optional<com.google.common.collect.ImmutableList<CxxLinkGroupMapping>> mapping,
TargetGraph graph)
Creates a predicate to filter resources that will be included in an apple_bundle.
|
public static Optional<LinkableListFilter> from(CxxBuckConfig cxxBuckConfig, LinkableCxxConstructorArg linkableArg, TargetGraph targetGraph)
LinkableCxxConstructorArg
and forwards the call.public static Optional<LinkableListFilter> from(CxxBuckConfig cxxBuckConfig, Optional<String> linkGroup, com.google.common.collect.ImmutableList<CxxLinkGroupMapping> mapping, TargetGraph targetGraph)
LinkableListFilter
based on a link group map and a target graph. Shared
libraries will get linked as normal and no filtering would occur. Static libraries will be
linked according to the link group membership.cxxBuckConfig
- If link groups are not enabled in the config, an empty Optional
would be returned.linkGroup
- Defines the link group of the executable being linked. By definition, it will
be linked against libraries which belong to the same link group. If the link group is
empty, the executable would linked against libraries which do not belong to any link
groups.mapping
- Defines the mapping which determines which link group specific targets belong
to.targetGraph
- The target graph which is used by the mapping to compute link group
membership.@Nonnull public static java.util.function.Predicate<BuildTarget> resourcePredicateFrom(CxxBuckConfig cxxBuckConfig, Optional<String> resourceGroup, Optional<com.google.common.collect.ImmutableList<CxxLinkGroupMapping>> mapping, TargetGraph graph)