blob: 4a70d48f7625d2e3e6736325200f2b7248c91c06 [file] [log] [blame]
Ivan Lozano183a3212019-10-18 14:18:45 -07001package cc
2
3import (
4 "github.com/google/blueprint"
5
6 "android/soong/android"
7)
8
9type LinkableInterface interface {
10 Module() android.Module
11 CcLibrary() bool
12 CcLibraryInterface() bool
13
Ivan Lozano183a3212019-10-18 14:18:45 -070014 OutputFile() android.OptionalPath
15
Ivan Lozanoe0833b12019-11-06 19:15:49 -080016 IncludeDirs() android.Paths
Ivan Lozano183a3212019-10-18 14:18:45 -070017 SetDepsInLinkOrder([]android.Path)
18 GetDepsInLinkOrder() []android.Path
19
20 HasStaticVariant() bool
21 GetStaticVariant() LinkableInterface
22
Ivan Lozano2b262972019-11-21 12:30:50 -080023 NonCcVariants() bool
24
Ivan Lozano183a3212019-10-18 14:18:45 -070025 StubsVersions() []string
Ivan Lozano52767be2019-10-18 14:49:46 -070026 BuildStubs() bool
Ivan Lozano183a3212019-10-18 14:18:45 -070027 SetBuildStubs()
28 SetStubsVersions(string)
Jooyung Han03b51852020-02-26 22:45:42 +090029 StubsVersion() string
Ivan Lozano52767be2019-10-18 14:49:46 -070030 HasStubsVariants() bool
31 SelectedStl() string
32 ApiLevel() string
Ivan Lozano183a3212019-10-18 14:18:45 -070033
34 BuildStaticVariant() bool
35 BuildSharedVariant() bool
36 SetStatic()
37 SetShared()
Ivan Lozano52767be2019-10-18 14:49:46 -070038 Static() bool
39 Shared() bool
40 Toc() android.OptionalPath
41
Jooyung Han624d35c2020-04-10 12:57:24 +090042 Host() bool
43
Yifan Hong1b3348d2020-01-21 15:53:22 -080044 InRamdisk() bool
45 OnlyInRamdisk() bool
46
Ivan Lozano52767be2019-10-18 14:49:46 -070047 InRecovery() bool
48 OnlyInRecovery() bool
49
Colin Crossc511bc52020-04-07 16:50:32 +000050 UseSdk() bool
Ivan Lozano52767be2019-10-18 14:49:46 -070051 UseVndk() bool
52 MustUseVendorVariant() bool
53 IsVndk() bool
54 HasVendorVariant() bool
55
56 SdkVersion() string
Colin Crossc511bc52020-04-07 16:50:32 +000057 AlwaysSdk() bool
Ivan Lozano52767be2019-10-18 14:49:46 -070058
59 ToolchainLibrary() bool
60 NdkPrebuiltStl() bool
61 StubDecorator() bool
Ivan Lozano183a3212019-10-18 14:18:45 -070062}
63
64type DependencyTag struct {
65 blueprint.BaseDependencyTag
66 Name string
67 Library bool
68 Shared bool
69
70 ReexportFlags bool
71
72 ExplicitlyVersioned bool
Jiyong Parkd7536ba2020-01-16 17:14:23 +090073
74 FromStatic bool
Ivan Lozano183a3212019-10-18 14:18:45 -070075}
76
77var (
78 SharedDepTag = DependencyTag{Name: "shared", Library: true, Shared: true}
79 StaticDepTag = DependencyTag{Name: "static", Library: true}
80
Jiyong Parkd7536ba2020-01-16 17:14:23 +090081 // Same as SharedDepTag, but from a static lib
82 SharedFromStaticDepTag = DependencyTag{Name: "shared from static", Library: true, Shared: true, FromStatic: true}
83
Ivan Lozano183a3212019-10-18 14:18:45 -070084 CrtBeginDepTag = DependencyTag{Name: "crtbegin"}
85 CrtEndDepTag = DependencyTag{Name: "crtend"}
86)