platform_build_soong/cc/linkable.go
Jooyung Han 03b5185b88 apex: choose stub according to min_sdk_version
Native modules within APEX should be linked with proper stub version
according to its min_sdk_version.

For example, when min_sdk_version is set to "29", libfoo in the apex
would be linked to libbar of version 29 from platform, even if it has
a newer version like 30.

Bug: 145796956
Test: m nothing (soong tests)
Change-Id: I4a0b2002587bc24b7deeb5d59b6eeba5e1db5b1f
2020-03-07 03:12:45 +09:00

82 lines
1.5 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)
StubsVersion() string
HasStubsVariants() bool
SelectedStl() string
ApiLevel() string
BuildStaticVariant() bool
BuildSharedVariant() bool
SetStatic()
SetShared()
Static() bool
Shared() bool
Toc() android.OptionalPath
InRamdisk() bool
OnlyInRamdisk() bool
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
FromStatic bool
}
var (
SharedDepTag = DependencyTag{Name: "shared", Library: true, Shared: true}
StaticDepTag = DependencyTag{Name: "static", Library: true}
// Same as SharedDepTag, but from a static lib
SharedFromStaticDepTag = DependencyTag{Name: "shared from static", Library: true, Shared: true, FromStatic: true}
CrtBeginDepTag = DependencyTag{Name: "crtbegin"}
CrtEndDepTag = DependencyTag{Name: "crtend"}
)