public abstract class PreInclude extends NoopBuildRuleWithDeclaredAndExtraDeps implements NativeLinkableGroup, CxxPreprocessorDep
Rules which depend on this will inherit this rule's of dependencies. For example if a given
rule R uses a precompiled header rule P, then all of P's deps
will get merged into R's
deps
list.
NativeLinkableGroup.Linkage
Modifier and Type | Method and Description |
---|---|
protected com.facebook.buck.cxx.PreprocessorDelegate |
buildPreprocessorDelegate(CxxPlatform cxxPlatform,
Preprocessor preprocessor,
CxxToolFlags preprocessorFlags,
ActionGraphBuilder graphBuilder,
SourcePathResolverAdapter pathResolver) |
Path |
getAbsoluteHeaderPath() |
Iterable<CxxPreprocessorDep> |
getCxxPreprocessorDeps(CxxPlatform cxxPlatform,
BuildRuleResolver ruleResolver) |
CxxPreprocessorInput |
getCxxPreprocessorInput(CxxPlatform cxxPlatform,
ActionGraphBuilder graphBuilder)
Returns the preprocessor input that represents this rule's public (exported) declarations.
|
SourcePath |
getHeaderSourcePath() |
NativeLinkable |
getNativeLinkable(CxxPlatform cxxPlatform,
ActionGraphBuilder graphBuilder) |
abstract com.facebook.buck.cxx.CxxPrecompiledHeader |
getPrecompiledHeader(boolean canPrecompile,
com.facebook.buck.cxx.PreprocessorDelegate preprocessorDelegateForCxxRule,
DependencyAggregation aggregatedPreprocessDepsRule,
CxxToolFlags computedCompilerFlags,
java.util.function.Function<CxxToolFlags,String> getHash,
java.util.function.Function<CxxToolFlags,String> getBaseHash,
CxxPlatform cxxPlatform,
CxxSource.Type sourceType,
com.google.common.collect.ImmutableList<String> sourceFlags,
ActionGraphBuilder graphBuilder,
SourcePathResolverAdapter pathResolver) |
Path |
getRelativeHeaderPath(ProjectFilesystem relativizedTo) |
com.google.common.collect.ImmutableMap<BuildTarget,CxxPreprocessorInput> |
getTransitiveCxxPreprocessorInput(CxxPlatform cxxPlatform,
ActionGraphBuilder graphBuilder)
Returns all transitive preprocessor inputs for this library.
|
protected DependencyAggregation |
requireAggregatedDepsRule(CxxPlatform cxxPlatform,
ActionGraphBuilder graphBuilder)
Find or create a
DependencyAggregation rule, representing a grouping of dependencies:
generally, those deps from the current CxxPlatform . |
protected com.facebook.buck.cxx.CxxPrecompiledHeader |
requirePrecompiledHeader(boolean canPrecompile,
com.facebook.buck.cxx.PreprocessorDelegate preprocessorDelegate,
CxxPlatform cxxPlatform,
CxxSource.Type sourceType,
CxxToolFlags compilerFlags,
DepsBuilder depsBuilder,
BuildTarget buildTarget,
ActionGraphBuilder graphBuilder)
Look up or build a precompiled header build rule which this build rule is requesting.
|
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
getBuildTarget
compareTo, getFullyQualifiedName, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution
public SourcePath getHeaderSourcePath()
cxx_precompiled_header
's src
attribute,
or of a rule's prefix_header
.public Path getAbsoluteHeaderPath()
public Path getRelativeHeaderPath(ProjectFilesystem relativizedTo)
public NativeLinkable getNativeLinkable(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
getNativeLinkable
in interface NativeLinkableGroup
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 com.google.common.collect.ImmutableMap<BuildTarget,CxxPreprocessorInput> getTransitiveCxxPreprocessorInput(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
CxxPreprocessorDep
getTransitiveCxxPreprocessorInput
in interface CxxPreprocessorDep
protected DependencyAggregation requireAggregatedDepsRule(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
DependencyAggregation
rule, representing a grouping of dependencies:
generally, those deps from the current CxxPlatform
.protected com.facebook.buck.cxx.PreprocessorDelegate buildPreprocessorDelegate(CxxPlatform cxxPlatform, Preprocessor preprocessor, CxxToolFlags preprocessorFlags, ActionGraphBuilder graphBuilder, SourcePathResolverAdapter pathResolver)
public abstract com.facebook.buck.cxx.CxxPrecompiledHeader getPrecompiledHeader(boolean canPrecompile, com.facebook.buck.cxx.PreprocessorDelegate preprocessorDelegateForCxxRule, DependencyAggregation aggregatedPreprocessDepsRule, CxxToolFlags computedCompilerFlags, java.util.function.Function<CxxToolFlags,String> getHash, java.util.function.Function<CxxToolFlags,String> getBaseHash, CxxPlatform cxxPlatform, CxxSource.Type sourceType, com.google.common.collect.ImmutableList<String> sourceFlags, ActionGraphBuilder graphBuilder, SourcePathResolverAdapter pathResolver)
protected com.facebook.buck.cxx.CxxPrecompiledHeader requirePrecompiledHeader(boolean canPrecompile, com.facebook.buck.cxx.PreprocessorDelegate preprocessorDelegate, CxxPlatform cxxPlatform, CxxSource.Type sourceType, CxxToolFlags compilerFlags, DepsBuilder depsBuilder, BuildTarget buildTarget, ActionGraphBuilder graphBuilder)
This method will first try to determine whether a matching PCH was already created; if so,
it will be reused. This is done by searching the cache in the ActionGraphBuilder
owned
by this class. If this ends up building a new instance of CxxPrecompiledHeader
, it will
be added to the graphBuilder cache.