public class CGoLibrary extends NoopBuildRuleWithDeclaredAndExtraDeps
The process consists of four steps (similiar to go build): 1. Generate c sources with cgo tool 2. Compile and link cgo sources into single object 3. Generate cgo_import.go 4. Return generated go files and linked object (used by GoCompile)
Modifier and Type | Method and Description |
---|---|
static BuildRule |
create(BuildRuleParams params,
BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
ActionGraphBuilder graphBuilder,
CellPathResolver cellRoots,
CxxBuckConfig cxxBuckConfig,
com.facebook.buck.features.go.GoPlatform platform,
CgoLibraryDescriptionArg args,
Iterable<BuildTarget> cxxDeps,
Tool cgo) |
com.google.common.collect.ImmutableList<SourcePath> |
getGeneratedGoSource()
returns .go files produced by cgo tool
|
Iterable<BuildRule> |
getLinkableDeps() |
SourcePath |
getOutput()
returns compiled linkable file source path
|
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
compareTo, getFullyQualifiedName, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution
public static BuildRule create(BuildRuleParams params, BuildTarget buildTarget, ProjectFilesystem projectFilesystem, ActionGraphBuilder graphBuilder, CellPathResolver cellRoots, CxxBuckConfig cxxBuckConfig, com.facebook.buck.features.go.GoPlatform platform, CgoLibraryDescriptionArg args, Iterable<BuildTarget> cxxDeps, Tool cgo)
public com.google.common.collect.ImmutableList<SourcePath> getGeneratedGoSource()
public SourcePath getOutput()