public class LegacyToolchainRuleDescription extends Object implements RuleDescription<LegacyToolchainDescriptionArg>, ImplicitDepsInferringDescription<LegacyToolchainDescriptionArg>
'legacy' toolchains are ones that may do extra work behind the scenes in a way that is not
directly able to be represented by Rule Analysis. This might be something like looking at the
local environment, finding executables on the system path, etc. They are also used to minimmize
the amount of porting work that has to be done up-front. Old rules can continue to use old
toolchain retreival methods like
TargetConfiguration), whereas new UDR/RAG rules can have a clean interface where
Provider instances do all necessary communication about
We expose these currently so that new rules can use existing compilers, tools, etc. However in the future, these should be discarded in favor of proper build rules that only exist in RAG/UDR.
|Constructor and Description|
|Modifier and Type||Method and Description|
The type of the constructor argument that is used by this description to create a rule
Runs the rule implementation during the analysis phase.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public LegacyToolchainRuleDescription(ToolchainProvider toolchainProvider)
public ProviderInfoCollection ruleImpl(RuleAnalysisContext context, BuildTarget target, LegacyToolchainDescriptionArg args) throws ActionCreationException, RuleAnalysisException
Providers and corresponding
InfoInterfaces, and register its corresponding actions.
RuleAnalysisContextcontaining all the information usable by this rule for it's analysis and constructive of its corresponding
BuildTargetof this rule
args- The args of type
Tthat this rule uses to rule its analysis
ProviderInfoCollectionthat contains all the
Providerand the corresponding
InfoInterfaceto be propagated by this rule.
ActionCreationException- If an action cannot be created correctly
RuleAnalysisException- If the rule implementation could not run as expected. e.g. if the implementation method of a User Defined Rule fails to eval
public Class<LegacyToolchainDescriptionArg> getConstructorArgType()
public void findDepsForTargetFromConstructorArgs(BuildTarget buildTarget, CellNameResolver cellRoots, LegacyToolchainDescriptionArg constructorArg, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> extraDepsBuilder, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder)