platform_build_soong/cc/linkable.go
Ivan Lozano 183a3218e2 Add a common interface for cc linkable libraries.
Adds an interface, CcLinkableInterface, for cc linkable dependencies
which come from other toolchains such as Rust.

Bug: 140726209
Test: Soong tests pass, rust modules still compile.
Change-Id: I7378a46fad94fd0b735746aaf4e265fd2c2c04d8
2019-10-28 13:45:12 -07:00

51 lines
957 B
Go

package cc
import (
"github.com/google/blueprint"
"android/soong/android"
)
type LinkableInterface interface {
Module() android.Module
CcLibrary() bool
CcLibraryInterface() bool
InRecovery() bool
OutputFile() android.OptionalPath
IncludeDirs() android.Paths
SetDepsInLinkOrder([]android.Path)
GetDepsInLinkOrder() []android.Path
HasStaticVariant() bool
GetStaticVariant() LinkableInterface
StubsVersions() []string
SetBuildStubs()
SetStubsVersions(string)
BuildStaticVariant() bool
BuildSharedVariant() bool
SetStatic()
SetShared()
}
type DependencyTag struct {
blueprint.BaseDependencyTag
Name string
Library bool
Shared bool
ReexportFlags bool
ExplicitlyVersioned bool
}
var (
SharedDepTag = DependencyTag{Name: "shared", Library: true, Shared: true}
StaticDepTag = DependencyTag{Name: "static", Library: true}
CrtBeginDepTag = DependencyTag{Name: "crtbegin"}
CrtEndDepTag = DependencyTag{Name: "crtend"}
)