cc.LinkableInterfaces should be able to request if an empty variant is required from the LinkageMutator. We were previously assuming that if only static or shared libraries were being built, then we didn't need the empty variant. However this should be explicit to handle cases where the default set of variants being created may not include both static and shared libraries. Bug: 144861059 Test: m -j crosvm.experimental Change-Id: I66724bdc16ff350b06dfa4d049c82f33019979a5
74 lines
1.3 KiB
Go
74 lines
1.3 KiB
Go
package cc
|
|
|
|
import (
|
|
"github.com/google/blueprint"
|
|
|
|
"android/soong/android"
|
|
)
|
|
|
|
type LinkableInterface interface {
|
|
Module() android.Module
|
|
CcLibrary() bool
|
|
CcLibraryInterface() bool
|
|
|
|
OutputFile() android.OptionalPath
|
|
|
|
IncludeDirs() android.Paths
|
|
SetDepsInLinkOrder([]android.Path)
|
|
GetDepsInLinkOrder() []android.Path
|
|
|
|
HasStaticVariant() bool
|
|
GetStaticVariant() LinkableInterface
|
|
|
|
NonCcVariants() bool
|
|
|
|
StubsVersions() []string
|
|
BuildStubs() bool
|
|
SetBuildStubs()
|
|
SetStubsVersions(string)
|
|
HasStubsVariants() bool
|
|
SelectedStl() string
|
|
ApiLevel() string
|
|
|
|
BuildStaticVariant() bool
|
|
BuildSharedVariant() bool
|
|
SetStatic()
|
|
SetShared()
|
|
Static() bool
|
|
Shared() bool
|
|
Toc() android.OptionalPath
|
|
|
|
InRecovery() bool
|
|
OnlyInRecovery() bool
|
|
|
|
UseVndk() bool
|
|
MustUseVendorVariant() bool
|
|
IsVndk() bool
|
|
HasVendorVariant() bool
|
|
|
|
SdkVersion() string
|
|
|
|
ToolchainLibrary() bool
|
|
NdkPrebuiltStl() bool
|
|
StubDecorator() bool
|
|
}
|
|
|
|
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"}
|
|
)
|