public class CxxBinary extends AbstractBuildRuleWithDeclaredAndExtraDeps implements BinaryBuildRule, NativeTestable, HasRuntimeDeps, HasAppleDebugSymbolDeps, SupportsInputBasedRuleKey, HasSupplementaryOutputs
Constructor and Description |
---|
CxxBinary(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams params,
CxxPlatform cxxPlatform,
BuildRule linkRule,
Tool executable,
Iterable<FrameworkPath> frameworks,
Iterable<BuildTarget> tests,
BuildTarget platformlessTarget,
boolean cacheable) |
Modifier and Type | Method and Description |
---|---|
java.util.stream.Stream<BuildRule> |
getAppleDebugSymbolDeps() |
com.google.common.collect.ImmutableList<Step> |
getBuildSteps(BuildContext context,
BuildableContext buildableContext) |
CxxPlatform |
getCxxPlatform() |
Tool |
getExecutableCommand(OutputLabel outputLabel)
Command to execute the output of this rule.
|
BuildRule |
getLinkRule() |
CxxPreprocessorInput |
getPrivateCxxPreprocessorInput(CxxPlatform cxxPlatform,
ActionGraphBuilder graphBuilder)
Return the
CxxPreprocessorInput to expose private headers of this rule. |
java.util.stream.Stream<BuildTarget> |
getRuntimeDeps(BuildRuleResolver buildRuleResolver) |
SourcePath |
getSourcePathToOutput() |
SourcePath |
getSourcePathToSupplementaryOutput(String name)
Returns a SourcePath to a named supplementary output, or null if it does not exist.
|
boolean |
isCacheable()
Whether this
BuildRule can be cached. |
boolean |
isTestedBy(BuildTarget testRule)
Return true if this rule is tested by
testTarget , false otherwise. |
deprecatedGetExtraDeps, getBuildDeps, getDeclaredDeps, getTargetGraphOnlyDeps
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, toString, updateBuildRuleResolver
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
inputBasedRuleKeyIsEnabled, isSupported
compareTo, getBuildDeps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolver
getDependencies, getSourcePathOutputs
getType
public CxxBinary(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params, CxxPlatform cxxPlatform, BuildRule linkRule, Tool executable, Iterable<FrameworkPath> frameworks, Iterable<BuildTarget> tests, BuildTarget platformlessTarget, boolean cacheable)
public Tool getExecutableCommand(OutputLabel outputLabel)
BinaryBuildRule
getExecutableCommand
in interface BinaryBuildRule
outputLabel
- associated with the executablepublic com.google.common.collect.ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps
in interface BuildRule
public SourcePath getSourcePathToOutput()
getSourcePathToOutput
in interface BuildRule
public BuildRule getLinkRule()
public boolean isTestedBy(BuildTarget testRule)
NativeTestable
testTarget
, false otherwise.isTestedBy
in interface NativeTestable
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 java.util.stream.Stream<BuildRule> getAppleDebugSymbolDeps()
getAppleDebugSymbolDeps
in interface HasAppleDebugSymbolDeps
public boolean isCacheable()
BuildRule
BuildRule
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 BuildEngineAction
isCacheable
in interface BuildRule
isCacheable
in class AbstractBuildRule
public java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps
in interface HasRuntimeDeps
public CxxPlatform getCxxPlatform()
@Nullable public SourcePath getSourcePathToSupplementaryOutput(String name)
HasSupplementaryOutputs
getSourcePathToSupplementaryOutput
in interface HasSupplementaryOutputs