public class CxxGenruleDescription extends AbstractGenruleDescription<CxxGenruleDescriptionArg> implements Flavored, VersionPropagator<CxxGenruleDescriptionArg>, ImplicitDepsInferringDescription<CxxGenruleDescriptionArg>
AbstractGenruleDescription.CommonArg
buckConfig, enableSandbox, sandboxExecutionStrategy, toolchainProvider
Constructor and Description |
---|
CxxGenruleDescription(ToolchainProvider toolchainProvider,
BuckConfig buckConfig,
CxxBuckConfig cxxBuckConfig,
SandboxExecutionStrategy sandboxExecutionStrategy) |
Modifier and Type | Method and Description |
---|---|
BuildRule |
createBuildRule(BuildRuleCreationContextWithTargetGraph context,
BuildTarget buildTarget,
BuildRuleParams params,
CxxGenruleDescriptionArg args)
Create a
BuildRule for the given BuildRuleParams . |
protected BuildRule |
createBuildRule(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams params,
ActionGraphBuilder graphBuilder,
CxxGenruleDescriptionArg args,
Optional<Arg> cmd,
Optional<Arg> bash,
Optional<Arg> cmdExe) |
void |
findDepsForTargetFromConstructorArgs(BuildTarget buildTarget,
CellNameResolver cellRoots,
CxxGenruleDescriptionArg constructorArg,
com.google.common.collect.ImmutableCollection.Builder<BuildTarget> extraDepsBuilder,
com.google.common.collect.ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder) |
static SourcePath |
fixupSourcePath(ActionGraphBuilder graphBuilder,
CxxPlatform platform,
SourcePath path) |
static com.google.common.collect.ImmutableList<SourcePath> |
fixupSourcePaths(ActionGraphBuilder graphBuilder,
CxxPlatform cxxPlatform,
com.google.common.collect.ImmutableList<SourcePath> paths) |
static <T> com.google.common.collect.ImmutableMap<T,SourcePath> |
fixupSourcePaths(ActionGraphBuilder graphBuilder,
CxxPlatform cxxPlatform,
com.google.common.collect.ImmutableMap<T,SourcePath> paths) |
static com.google.common.collect.ImmutableSortedSet<SourcePath> |
fixupSourcePaths(ActionGraphBuilder graphBuilder,
CxxPlatform cxxPlatform,
com.google.common.collect.ImmutableSortedSet<SourcePath> paths) |
Class<CxxGenruleDescriptionArg> |
getConstructorArgType()
The type of the constructor argument that is used by this description to create a rule
|
protected Optional<com.google.common.collect.ImmutableList<MacroExpander<? extends Macro,?>>> |
getMacroHandler(BuildTarget buildTarget,
ProjectFilesystem filesystem,
BuildRuleResolver resolver,
TargetGraph targetGraph,
CxxGenruleDescriptionArg args) |
boolean |
hasFlavors(com.google.common.collect.ImmutableSet<Flavor> flavors,
TargetConfiguration toolchainTargetConfiguration) |
boolean |
producesCacheableSubgraph()
Whether or not the build rule subgraph produced by this
Description is safe to cache in
IncrementalActionGraphGenerator
for incremental action graph generation. |
static boolean |
wrapsCxxGenrule(SourcePathRuleFinder ruleFinder,
SourcePath path) |
canExecuteRemotely, createBuildRule, getAndroidToolsOptional, getGenruleType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flavorDomains
getConfigurationDeps
public CxxGenruleDescription(ToolchainProvider toolchainProvider, BuckConfig buckConfig, CxxBuckConfig cxxBuckConfig, SandboxExecutionStrategy sandboxExecutionStrategy)
public static boolean wrapsCxxGenrule(SourcePathRuleFinder ruleFinder, SourcePath path)
public static SourcePath fixupSourcePath(ActionGraphBuilder graphBuilder, CxxPlatform platform, SourcePath path)
BuildTargetSourcePath
for an existing BuildTargetSourcePath
which
refers to a CxxGenrule
with the given platform
flavor applied.public static com.google.common.collect.ImmutableList<SourcePath> fixupSourcePaths(ActionGraphBuilder graphBuilder, CxxPlatform cxxPlatform, com.google.common.collect.ImmutableList<SourcePath> paths)
public static com.google.common.collect.ImmutableSortedSet<SourcePath> fixupSourcePaths(ActionGraphBuilder graphBuilder, CxxPlatform cxxPlatform, com.google.common.collect.ImmutableSortedSet<SourcePath> paths)
public static <T> com.google.common.collect.ImmutableMap<T,SourcePath> fixupSourcePaths(ActionGraphBuilder graphBuilder, CxxPlatform cxxPlatform, com.google.common.collect.ImmutableMap<T,SourcePath> paths)
public Class<CxxGenruleDescriptionArg> getConstructorArgType()
BaseDescription
getConstructorArgType
in interface BaseDescription<CxxGenruleDescriptionArg>
public boolean hasFlavors(com.google.common.collect.ImmutableSet<Flavor> flavors, TargetConfiguration toolchainTargetConfiguration)
hasFlavors
in interface Flavored
flavors
- The set of Flavor
s to consider. All must match.BuildRule
of the given Flavor
can be created.protected Optional<com.google.common.collect.ImmutableList<MacroExpander<? extends Macro,?>>> getMacroHandler(BuildTarget buildTarget, ProjectFilesystem filesystem, BuildRuleResolver resolver, TargetGraph targetGraph, CxxGenruleDescriptionArg args)
getMacroHandler
in class AbstractGenruleDescription<CxxGenruleDescriptionArg>
MacroExpander
s which apply to the macros in
this description.public BuildRule createBuildRule(BuildRuleCreationContextWithTargetGraph context, BuildTarget buildTarget, BuildRuleParams params, CxxGenruleDescriptionArg args)
DescriptionWithTargetGraph
BuildRule
for the given BuildRuleParams
. Note that the BuildTarget
referred to in the params
contains the Flavor
to create.createBuildRule
in interface DescriptionWithTargetGraph<CxxGenruleDescriptionArg>
createBuildRule
in class AbstractGenruleDescription<CxxGenruleDescriptionArg>
args
- A constructor argument, of type as returned by BaseDescription.getConstructorArgType()
.BuildRule
that describes the default flavour of the rule being described.protected BuildRule createBuildRule(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params, ActionGraphBuilder graphBuilder, CxxGenruleDescriptionArg args, Optional<Arg> cmd, Optional<Arg> bash, Optional<Arg> cmdExe)
createBuildRule
in class AbstractGenruleDescription<CxxGenruleDescriptionArg>
public void findDepsForTargetFromConstructorArgs(BuildTarget buildTarget, CellNameResolver cellRoots, CxxGenruleDescriptionArg constructorArg, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> extraDepsBuilder, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder)
findDepsForTargetFromConstructorArgs
in interface ImplicitDepsInferringDescription<CxxGenruleDescriptionArg>
findDepsForTargetFromConstructorArgs
in class AbstractGenruleDescription<CxxGenruleDescriptionArg>
public boolean producesCacheableSubgraph()
DescriptionWithTargetGraph
Description
is safe to cache in
IncrementalActionGraphGenerator
for incremental action graph generation.producesCacheableSubgraph
in interface Description<CxxGenruleDescriptionArg>
producesCacheableSubgraph
in interface DescriptionWithTargetGraph<CxxGenruleDescriptionArg>