public class CxxStrip extends AbstractBuildRule implements SupportsInputBasedRuleKey
| Modifier and Type | Field and Description |
|---|---|
static Flavor |
RULE_FLAVOR
Used to identify this rule in the graph.
|
| Constructor and Description |
|---|
CxxStrip(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
SourcePath unstrippedBinary,
SourcePathRuleFinder ruleFinder,
StripStyle stripStyle,
Tool strip,
boolean isCacheable,
Path output) |
| Modifier and Type | Method and Description |
|---|---|
SortedSet<BuildRule> |
getBuildDeps() |
com.google.common.collect.ImmutableList<Step> |
getBuildSteps(BuildContext context,
BuildableContext buildableContext) |
SourcePath |
getSourcePathToOutput() |
StripStyle |
getStripStyle() |
boolean |
isCacheable()
Whether this
BuildRule can be cached. |
static BuildTarget |
removeStripStyleFlavorInTarget(BuildTarget buildTarget,
Optional<StripStyle> flavoredStripStyle) |
static BuildTarget |
restoreStripStyleFlavorInTarget(BuildTarget buildTarget,
Optional<StripStyle> flavoredStripStyle) |
void |
updateBuildRuleResolver(BuildRuleResolver ruleResolver)
Updates the BuildRuleResolver and associated objects for this build rule.
|
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitinputBasedRuleKeyIsEnabled, isSupportedcompareTo, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toStringgetDependencies, getSourcePathOutputsgetTypepublic static final Flavor RULE_FLAVOR
public CxxStrip(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, SourcePath unstrippedBinary, SourcePathRuleFinder ruleFinder, StripStyle stripStyle, Tool strip, boolean isCacheable, Path output)
public static BuildTarget removeStripStyleFlavorInTarget(BuildTarget buildTarget, Optional<StripStyle> flavoredStripStyle)
public static BuildTarget restoreStripStyleFlavorInTarget(BuildTarget buildTarget, Optional<StripStyle> flavoredStripStyle)
public SortedSet<BuildRule> getBuildDeps()
getBuildDeps in interface BuildRuledeps argument for this build rule in the build file in which it was defined.
However, there are special cases where other arguments pull in implicit dependencies
(e.g., the keystore argument in android_binary). In these cases, the
implicit dependencies are also included in the set returned by this method. The value of
the original deps argument, as defined in the build file, must be accessed via a
custom getter provided by the build rule.
public com.google.common.collect.ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps in interface BuildRulepublic StripStyle getStripStyle()
public boolean isCacheable()
BuildRuleBuildRule can be cached.
Uncached build rules are never written out to cache, never read from cache, and does not count in cache statistics. This rule is useful for artifacts which cannot be easily normalized.
Uncached rules are not always rebuilt, however, as long as the existing on-disk
representation is up to date. This means that these rules can take advantage of SupportsInputBasedRuleKey to prevent rebuilding.
isCacheable in interface BuildEngineActionisCacheable in interface BuildRuleisCacheable in class AbstractBuildRulepublic SourcePath getSourcePathToOutput()
getSourcePathToOutput in interface BuildRulepublic void updateBuildRuleResolver(BuildRuleResolver ruleResolver)
BuildRuleBuild rules sometimes hold field references to build rule resolvers. If this build rule is to be cached, it must update its BuildRuleResolver when a new action graph is constructed to avoid leaking the entire action graph it was originally associated with.
updateBuildRuleResolver in interface BuildRuleupdateBuildRuleResolver in class AbstractBuildRule