blob: e4f034c7f0c951f6622a7d3ec6ae3918d5ea8937 [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)
Ivan Lozano52767be2019-10-18 14:49:46 -070029 HasStubsVariants() bool
30 SelectedStl() string
31 ApiLevel() string
Ivan Lozano183a3212019-10-18 14:18:45 -070032
33 BuildStaticVariant() bool
34 BuildSharedVariant() bool
35 SetStatic()
36 SetShared()
Ivan Lozano52767be2019-10-18 14:49:46 -070037 Static() bool
38 Shared() bool
39 Toc() android.OptionalPath
40
Yifan Hong1b3348d2020-01-21 15:53:22 -080041 InRamdisk() bool
42 OnlyInRamdisk() bool
43
Ivan Lozano52767be2019-10-18 14:49:46 -070044 InRecovery() bool
45 OnlyInRecovery() bool
46
47 UseVndk() bool
48 MustUseVendorVariant() bool
49 IsVndk() bool
50 HasVendorVariant() bool
51
52 SdkVersion() string
53
54 ToolchainLibrary() bool
55 NdkPrebuiltStl() bool
56 StubDecorator() bool
Ivan Lozano183a3212019-10-18 14:18:45 -070057}
58
59type DependencyTag struct {
60 blueprint.BaseDependencyTag
61 Name string
62 Library bool
63 Shared bool
64
65 ReexportFlags bool
66
67 ExplicitlyVersioned bool
Jiyong Parkd7536ba2020-01-16 17:14:23 +090068
69 FromStatic bool
Ivan Lozano183a3212019-10-18 14:18:45 -070070}
71
72var (
73 SharedDepTag = DependencyTag{Name: "shared", Library: true, Shared: true}
74 StaticDepTag = DependencyTag{Name: "static", Library: true}
75
Jiyong Parkd7536ba2020-01-16 17:14:23 +090076 // Same as SharedDepTag, but from a static lib
77 SharedFromStaticDepTag = DependencyTag{Name: "shared from static", Library: true, Shared: true, FromStatic: true}
78
Ivan Lozano183a3212019-10-18 14:18:45 -070079 CrtBeginDepTag = DependencyTag{Name: "crtbegin"}
80 CrtEndDepTag = DependencyTag{Name: "crtend"}
81)