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, isCacheabledeprecatedGetExtraDeps, getBuildDeps, getDeclaredDeps, getTargetGraphOnlyDepsequals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hashCode, injectFields, toString, updateBuildRuleResolverclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTo, getFullyQualifiedName, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecutionpublic 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()