blob: 9147681d05a6e530bdf7b3e0870ed9e89478c11a [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 Han0c4e0162020-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 Hanc40b5192020-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
50 UseVndk() bool
51 MustUseVendorVariant() bool
52 IsVndk() bool
53 HasVendorVariant() bool
54
55 SdkVersion() string
56
57 ToolchainLibrary() bool
58 NdkPrebuiltStl() bool
59 StubDecorator() bool
Ivan Lozano183a3212019-10-18 14:18:45 -070060}
61
62type DependencyTag struct {
63 blueprint.BaseDependencyTag
64 Name string
65 Library bool
66 Shared bool
67
68 ReexportFlags bool
69
70 ExplicitlyVersioned bool
Jiyong Parkd7536ba2020-01-16 17:14:23 +090071
72 FromStatic bool
Ivan Lozano183a3212019-10-18 14:18:45 -070073}
74
75var (
76 SharedDepTag = DependencyTag{Name: "shared", Library: true, Shared: true}
77 StaticDepTag = DependencyTag{Name: "static", Library: true}
78
Jiyong Parkd7536ba2020-01-16 17:14:23 +090079 // Same as SharedDepTag, but from a static lib
80 SharedFromStaticDepTag = DependencyTag{Name: "shared from static", Library: true, Shared: true, FromStatic: true}
81
Ivan Lozano183a3212019-10-18 14:18:45 -070082 CrtBeginDepTag = DependencyTag{Name: "crtbegin"}
83 CrtEndDepTag = DependencyTag{Name: "crtend"}
84)