public abstract class RustLibrary extends NoopBuildRuleWithDeclaredAndExtraDeps implements LegacyNativeLinkableGroup
NativeLinkableGroup.Linkage
Constructor and Description |
---|
RustLibrary(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams params) |
Modifier and Type | Method and Description |
---|---|
BuildTarget |
getBuildTarget()
Return
BuildTarget for linkable |
Arg |
getLinkerArg(boolean direct,
boolean isCheck,
com.facebook.buck.features.rust.RustPlatform rustPlatform,
Linker.LinkableDepType depType,
Optional<String> alias)
Return Arg for dependency.
|
NativeLinkableGroup.Linkage |
getPreferredLinkage()
Return the linkage style for this linkable.
|
Iterable<BuildRule> |
getRustLinakbleDeps(com.facebook.buck.features.rust.RustPlatform rustPlatform) |
com.google.common.collect.ImmutableMap<String,SourcePath> |
getRustSharedLibraries(com.facebook.buck.features.rust.RustPlatform rustPlatform)
Return a map of shared libraries this linkable produces (typically just one)
|
boolean |
isProcMacro()
Return true if this is a compiler plugin
|
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
forceLinkWholeForHaskellOmnibus, getExportedLinkerFlags, getExportedPostLinkerFlags, getNativeLinkable, getNativeLinkableCache, getNativeLinkableCompatibilityCache, getNativeLinkableDeps, getNativeLinkableDepsForPlatform, getNativeLinkableExportedDeps, getNativeLinkableExportedDepsForPlatform, getNativeLinkableInput, getNativeLinkableInput, getNativeLinkTarget, getPreferredLinkage, getRuleType, getSharedLibraries, isPrebuiltSOForHaskellOmnibus, shouldBeLinkedInAppleTestAndHost, supportsOmnibusLinking, supportsOmnibusLinkingForHaskell
getBuildTarget
compareTo, getFullyQualifiedName, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution
public RustLibrary(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params)
public Arg getLinkerArg(boolean direct, boolean isCheck, com.facebook.buck.features.rust.RustPlatform rustPlatform, Linker.LinkableDepType depType, Optional<String> alias)
direct
- true for direct dependency, false for transitiveisCheck
- true if we're generated check buildsrustPlatform
- Current platform we're building for.depType
- What kind of linkage we want with the dependency.alias
- public BuildTarget getBuildTarget()
BuildTarget
for linkablepublic com.google.common.collect.ImmutableMap<String,SourcePath> getRustSharedLibraries(com.facebook.buck.features.rust.RustPlatform rustPlatform)
rustPlatform
- the platform we're generating the shared library forpublic Iterable<BuildRule> getRustLinakbleDeps(com.facebook.buck.features.rust.RustPlatform rustPlatform)
RustLinkable
.public NativeLinkableGroup.Linkage getPreferredLinkage()
public boolean isProcMacro()