public class CxxPrecompiledHeaderTemplate extends PreInclude implements AndroidPackageable
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
|Modifier and Type||Method and Description|
Add concrete resources to the given collector.
Build a PCH rule, given a
Get the set of packagables that need to be included in any package that includes this object.
buildPreprocessorDelegate, getAbsoluteHeaderPath, getCxxPreprocessorDeps, getCxxPreprocessorInput, getHeaderSourcePath, getNativeLinkable, getRelativeHeaderPath, getTransitiveCxxPreprocessorInput, requireAggregatedDepsRule, requirePrecompiledHeader
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
public 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)
We'll "instantiate" this PCH from this template, using the parameters (src, dependencies) from the template itself, plus the build flags that are used in the current build rule (so that this instantiated version uses compatible build flags and thus the PCH is guaranteed usable with this rule).
public Iterable<AndroidPackageable> getRequiredPackageables(BuildRuleResolver ruleResolver)
For example, an android_library will need all of its Java deps (except provided_deps), its resource deps, and its native library deps (even though it doesn't need the native library as a build-time dependency). An android_resource might need an android_library that declares a custom view that it references, as well as other android_resource rules that it references directly.
TODO(natthu): Once build rules and buildables are merged, replace this method with another
interface that lets an
AndroidPackageable override the default set which is all deps of
public void addToCollector(AndroidPackageableCollector collector)
Implementations should call methods on the collector specify what concrete content must be included in an Android package that includes this object. For example, an android_library will add Java classes, an ndk_library will add native libraries, and android_resource will add resource directories.