public class CxxLibraryGroup extends NoopBuildRuleWithDeclaredAndExtraDeps implements AbstractCxxLibraryGroup, HasRuntimeDeps, NativeTestable, LegacyNativeLinkableGroup, LegacyNativeLinkTargetGroup
NativeLinkableGroup.Linkage
Constructor and Description |
---|
CxxLibraryGroup(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams params,
CxxDeps deps,
CxxDeps exportedDeps,
java.util.function.Predicate<CxxPlatform> headerOnly,
java.util.function.BiFunction<? super CxxPlatform,ActionGraphBuilder,Iterable<? extends Arg>> exportedLinkerFlags,
java.util.function.BiFunction<? super CxxPlatform,ActionGraphBuilder,Iterable<? extends Arg>> postExportedLinkerFlags,
QuadFunction<? super CxxPlatform,ActionGraphBuilder,SourcePathResolverAdapter,Boolean,NativeLinkableInput> linkTargetInput,
Optional<Pattern> supportedPlatformsRegex,
com.google.common.collect.ImmutableSet<FrameworkPath> frameworks,
com.google.common.collect.ImmutableSet<FrameworkPath> libraries,
NativeLinkableGroup.Linkage linkage,
boolean linkWhole,
Optional<String> soname,
com.google.common.collect.ImmutableSortedSet<BuildTarget> tests,
boolean canBeAsset,
boolean propagateLinkables,
boolean reexportAllHeaderDependencies,
boolean supportsOmnibusLinking,
CxxLibraryDescriptionDelegate delegate) |
getBuildSteps, getSourcePathToOutput, hasBuildSteps, isCacheable
deprecatedGetExtraDeps, getBuildDeps, getDeclaredDeps, getTargetGraphOnlyDeps
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hashCode, injectFields, toString, updateBuildRuleResolver
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBuildTarget
compareTo, getBuildDeps, getBuildSteps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, getSourcePathToOutput, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolver
getDependencies, getSourcePathOutputs
getType
getNativeLinkable, getNativeLinkableCache, getNativeLinkableInput, getNativeLinkTarget, getRuleType, isPrebuiltSOForHaskellOmnibus, shouldBeLinkedInAppleTestAndHost
getBuildTarget
getTargetForPlatform
getBuildTarget
public CxxLibraryGroup(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params, CxxDeps deps, CxxDeps exportedDeps, java.util.function.Predicate<CxxPlatform> headerOnly, java.util.function.BiFunction<? super CxxPlatform,ActionGraphBuilder,Iterable<? extends Arg>> exportedLinkerFlags, java.util.function.BiFunction<? super CxxPlatform,ActionGraphBuilder,Iterable<? extends Arg>> postExportedLinkerFlags, QuadFunction<? super CxxPlatform,ActionGraphBuilder,SourcePathResolverAdapter,Boolean,NativeLinkableInput> linkTargetInput, Optional<Pattern> supportedPlatformsRegex, com.google.common.collect.ImmutableSet<FrameworkPath> frameworks, com.google.common.collect.ImmutableSet<FrameworkPath> libraries, NativeLinkableGroup.Linkage linkage, boolean linkWhole, Optional<String> soname, com.google.common.collect.ImmutableSortedSet<BuildTarget> tests, boolean canBeAsset, boolean propagateLinkables, boolean reexportAllHeaderDependencies, boolean supportsOmnibusLinking, CxxLibraryDescriptionDelegate delegate)
public Iterable<CxxPreprocessorDep> getCxxPreprocessorDeps(CxxPlatform cxxPlatform, BuildRuleResolver ruleResolver)
getCxxPreprocessorDeps
in interface CxxPreprocessorDep
public CxxPreprocessorInput getCxxPreprocessorInput(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
CxxPreprocessorDep
getCxxPreprocessorInput
in interface CxxPreprocessorDep
public CxxPreprocessorInput getPublicCxxPreprocessorInputExcludingDelegate(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
CxxLibraryDescriptionDelegate
.public CxxPreprocessorInput getPrivateCxxPreprocessorInput(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
NativeTestable
CxxPreprocessorInput
to expose private headers of this rule. This is used to
propagate private headers to the test testing this object. For convenience, tests can see
private headers visible in the rule being tested.getPrivateCxxPreprocessorInput
in interface NativeTestable
public com.google.common.collect.ImmutableMap<BuildTarget,CxxPreprocessorInput> getTransitiveCxxPreprocessorInput(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
CxxPreprocessorDep
getTransitiveCxxPreprocessorInput
in interface CxxPreprocessorDep
public Iterable<NativeLinkableGroup> getNativeLinkableDeps(BuildRuleResolver ruleResolver)
getNativeLinkableDeps
in interface LegacyNativeLinkableGroup
public Iterable<NativeLinkableGroup> getNativeLinkableDepsForPlatform(CxxPlatform cxxPlatform, BuildRuleResolver ruleResolver)
getNativeLinkableDepsForPlatform
in interface LegacyNativeLinkableGroup
public Iterable<? extends NativeLinkableGroup> getNativeLinkableExportedDeps(BuildRuleResolver ruleResolver)
getNativeLinkableExportedDeps
in interface LegacyNativeLinkableGroup
public Iterable<? extends NativeLinkableGroup> getNativeLinkableExportedDepsForPlatform(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
getNativeLinkableExportedDepsForPlatform
in interface LegacyNativeLinkableGroup
public NativeLinkableInput getNativeLinkableInput(CxxPlatform cxxPlatform, Linker.LinkableDepType type, boolean forceLinkWhole, ActionGraphBuilder graphBuilder, TargetConfiguration targetConfiguration)
LegacyNativeLinkableGroup
getNativeLinkableInput
in interface LegacyNativeLinkableGroup
public BuildRule requireBuildRule(ActionGraphBuilder graphBuilder, Flavor... flavors)
public NativeLinkableGroup.Linkage getPreferredLinkage(CxxPlatform cxxPlatform)
getPreferredLinkage
in interface LegacyNativeLinkableGroup
public Iterable<AndroidPackageable> getRequiredPackageables(BuildRuleResolver ruleResolver)
AndroidPackageable
For example, an android_library will need all of its Java deps (except provided_deps), its resource deps, and its native library deps (even though it doesn't need the native library as a build-time dependency). An android_resource might need an android_library that declares a custom view that it references, as well as other android_resource rules that it references directly.
TODO(natthu): Once build rules and buildables are merged, replace this method with another
interface that lets an AndroidPackageable
override the default set which is all deps of
the type AndroidPackageable
.
getRequiredPackageables
in interface AndroidPackageable
AndroidPackageable
s that must be included along with this one.public void addToCollector(AndroidPackageableCollector collector)
AndroidPackageable
Implementations should call methods on the collector specify what concrete content must be included in an Android package that includes this object. For example, an android_library will add Java classes, an ndk_library will add native libraries, and android_resource will add resource directories.
addToCollector
in interface AndroidPackageable
collector
- The AndroidPackageableCollector
that will receive the content.public com.google.common.collect.ImmutableMap<String,SourcePath> getSharedLibraries(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
getSharedLibraries
in interface LegacyNativeLinkableGroup
CxxPlatform
.public boolean isTestedBy(BuildTarget testTarget)
NativeTestable
testTarget
, false otherwise.isTestedBy
in interface NativeTestable
public NativeLinkTargetMode getNativeLinkTargetMode(CxxPlatform cxxPlatform)
getNativeLinkTargetMode
in interface LegacyNativeLinkTargetGroup
public Iterable<? extends NativeLinkableGroup> getNativeLinkTargetDeps(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
getNativeLinkTargetDeps
in interface LegacyNativeLinkTargetGroup
NativeLinkableGroup
dependencies used to link this target.public NativeLinkableInput getNativeLinkTargetInput(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder, SourcePathResolverAdapter pathResolver, boolean includePrivateLinkerFlags)
getNativeLinkTargetInput
in interface LegacyNativeLinkTargetGroup
NativeLinkableInput
used to link this target.public Optional<Path> getNativeLinkTargetOutputPath()
getNativeLinkTargetOutputPath
in interface LegacyNativeLinkTargetGroup
Path
to use for the output location.public boolean supportsOmnibusLinking(CxxPlatform cxxPlatform)
supportsOmnibusLinking
in interface LegacyNativeLinkableGroup
NativeLinkableGroup
supports omnibus linking.public boolean supportsOmnibusLinkingForHaskell(CxxPlatform cxxPlatform)
supportsOmnibusLinkingForHaskell
in interface LegacyNativeLinkableGroup
NativeLinkableGroup
supports omnibus linking for haskell.public java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps
in interface HasRuntimeDeps
public Iterable<? extends Arg> getExportedLinkerFlags(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
getExportedLinkerFlags
in interface LegacyNativeLinkableGroup
public Iterable<? extends Arg> getExportedPostLinkerFlags(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
getExportedPostLinkerFlags
in interface LegacyNativeLinkableGroup
public boolean forceLinkWholeForHaskellOmnibus()
forceLinkWholeForHaskellOmnibus
in interface LegacyNativeLinkableGroup
public PlatformLockedNativeLinkableGroup.Cache getNativeLinkableCompatibilityCache()
getNativeLinkableCompatibilityCache
in interface LegacyNativeLinkableGroup