@NotThreadSafe public abstract class CxxSourceRuleFactory extends Object
Constructor and Description |
---|
CxxSourceRuleFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkPrefixAndPrecompiledHeaderArgs() |
BuildTarget |
createCompileBuildTarget(String name) |
BuildTarget |
createInferCaptureBuildTarget(String name) |
BuildTarget |
createOptimizeBuildTarget(String name) |
protected abstract ActionGraphBuilder |
getActionGraphBuilder() |
protected abstract BuildTarget |
getBaseBuildTarget() |
protected abstract com.google.common.collect.ImmutableMultimap<CxxSource.Type,Arg> |
getCompilerFlags() |
protected abstract CxxBuckConfig |
getCxxBuckConfig() |
protected abstract CxxPlatform |
getCxxPlatform() |
protected abstract com.google.common.collect.ImmutableList<CxxPreprocessorInput> |
getCxxPreprocessorInput() |
protected com.google.common.collect.ImmutableSet<FrameworkPath> |
getFrameworks() |
protected com.google.common.collect.ImmutableList<CxxHeaders> |
getIncludes() |
protected abstract SourcePathResolverAdapter |
getPathResolver() |
protected abstract PicType |
getPicType() |
protected abstract Optional<SourcePath> |
getPrecompiledHeader()
NOTE:
precompiled_header is incompatible with prefix_header . |
protected abstract Optional<SourcePath> |
getPrefixHeader()
NOTE:
prefix_header is incompatible with precompiled_header . |
protected Optional<PreInclude> |
getPreInclude()
Get (possibly creating) the
PreInclude instance corresponding to this rule's prefix_header or precompiled_header , whichever is applicable, or empty if neither is
used. |
protected abstract ProjectFilesystem |
getProjectFilesystem() |
protected java.util.function.Function<String,String> |
getSanitizeFunction() |
static CxxSourceRuleFactory |
of(ProjectFilesystem projectFilesystem,
BuildTarget baseBuildTarget,
ActionGraphBuilder actionGraphBuilder,
SourcePathResolverAdapter pathResolver,
CxxBuckConfig cxxBuckConfig,
CxxPlatform cxxPlatform,
com.google.common.collect.ImmutableList<CxxPreprocessorInput> cxxPreprocessorInput,
com.google.common.collect.ImmutableMultimap<CxxSource.Type,Arg> compilerFlags,
Optional<SourcePath> prefixHeader,
Optional<SourcePath> precompiledHeader,
PicType picType) |
CxxPreprocessAndCompile |
requireCompileBuildRule(String name,
CxxSource source) |
com.google.common.collect.ImmutableSet<com.facebook.buck.cxx.CxxInferCapture> |
requireInferCaptureBuildRules(com.google.common.collect.ImmutableMap<String,CxxSource> sources,
InferBuckConfig inferConfig) |
CxxPreprocessAndCompile |
requirePreprocessAndCompileBuildRule(String name,
CxxSource source) |
com.google.common.collect.ImmutableMap<CxxPreprocessAndCompile,SourcePath> |
requirePreprocessAndCompileRules(com.google.common.collect.ImmutableMap<String,CxxSource> sources) |
com.google.common.collect.ImmutableMap<CxxThinLTOOpt,SourcePath> |
requireThinOptRules(com.google.common.collect.ImmutableMap<String,CxxSource> sources,
SourcePath thinIndicesRoot) |
protected abstract ProjectFilesystem getProjectFilesystem()
protected abstract BuildTarget getBaseBuildTarget()
protected abstract ActionGraphBuilder getActionGraphBuilder()
protected abstract SourcePathResolverAdapter getPathResolver()
protected abstract CxxBuckConfig getCxxBuckConfig()
protected abstract CxxPlatform getCxxPlatform()
protected abstract com.google.common.collect.ImmutableList<CxxPreprocessorInput> getCxxPreprocessorInput()
protected abstract com.google.common.collect.ImmutableMultimap<CxxSource.Type,Arg> getCompilerFlags()
protected abstract Optional<SourcePath> getPrefixHeader()
prefix_header
is incompatible with precompiled_header
.protected abstract Optional<SourcePath> getPrecompiledHeader()
precompiled_header
is incompatible with prefix_header
.protected abstract PicType getPicType()
@Value.Check protected void checkPrefixAndPrecompiledHeaderArgs()
@Value.Lazy protected Optional<PreInclude> getPreInclude()
PreInclude
instance corresponding to this rule's prefix_header
or precompiled_header
, whichever is applicable, or empty if neither is
used.PreIncludeFactory
@Value.Lazy protected com.google.common.collect.ImmutableSet<FrameworkPath> getFrameworks()
@Value.Lazy protected com.google.common.collect.ImmutableList<CxxHeaders> getIncludes()
public BuildTarget createOptimizeBuildTarget(String name)
CxxThinLTOOpt
rule for the source with the given name.public BuildTarget createCompileBuildTarget(String name)
CxxPreprocessAndCompile
rule for the source with the given
name.public BuildTarget createInferCaptureBuildTarget(String name)
@Value.Lazy protected java.util.function.Function<String,String> getSanitizeFunction()
public CxxPreprocessAndCompile requireCompileBuildRule(String name, CxxSource source)
public com.google.common.collect.ImmutableMap<CxxThinLTOOpt,SourcePath> requireThinOptRules(com.google.common.collect.ImmutableMap<String,CxxSource> sources, SourcePath thinIndicesRoot)
public CxxPreprocessAndCompile requirePreprocessAndCompileBuildRule(String name, CxxSource source)
public com.google.common.collect.ImmutableSet<com.facebook.buck.cxx.CxxInferCapture> requireInferCaptureBuildRules(com.google.common.collect.ImmutableMap<String,CxxSource> sources, InferBuckConfig inferConfig)
public com.google.common.collect.ImmutableMap<CxxPreprocessAndCompile,SourcePath> requirePreprocessAndCompileRules(com.google.common.collect.ImmutableMap<String,CxxSource> sources)
public static CxxSourceRuleFactory of(ProjectFilesystem projectFilesystem, BuildTarget baseBuildTarget, ActionGraphBuilder actionGraphBuilder, SourcePathResolverAdapter pathResolver, CxxBuckConfig cxxBuckConfig, CxxPlatform cxxPlatform, com.google.common.collect.ImmutableList<CxxPreprocessorInput> cxxPreprocessorInput, com.google.common.collect.ImmutableMultimap<CxxSource.Type,Arg> compilerFlags, Optional<SourcePath> prefixHeader, Optional<SourcePath> precompiledHeader, PicType picType)