Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 1 | package cc |
| 2 | |
| 3 | import ( |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 4 | "android/soong/android" |
Colin Cross | 6e511a9 | 2020-07-27 21:26:48 -0700 | [diff] [blame] | 5 | |
| 6 | "github.com/google/blueprint" |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 7 | ) |
| 8 | |
| 9 | type LinkableInterface interface { |
| 10 | Module() android.Module |
| 11 | CcLibrary() bool |
| 12 | CcLibraryInterface() bool |
| 13 | |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 14 | OutputFile() android.OptionalPath |
Ivan Lozano | a0cd8f9 | 2020-04-09 09:56:02 -0400 | [diff] [blame] | 15 | CoverageFiles() android.Paths |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 16 | |
Ivan Lozano | 2b26297 | 2019-11-21 12:30:50 -0800 | [diff] [blame] | 17 | NonCcVariants() bool |
| 18 | |
Colin Cross | 3572cf7 | 2020-10-01 15:58:11 -0700 | [diff] [blame^] | 19 | StubsVersions(android.BaseMutatorContext) []string |
Ivan Lozano | 52767be | 2019-10-18 14:49:46 -0700 | [diff] [blame] | 20 | BuildStubs() bool |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 21 | SetBuildStubs() |
Colin Cross | d1f898e | 2020-08-18 18:35:15 -0700 | [diff] [blame] | 22 | SetStubsVersion(string) |
Jooyung Han | 03b5185 | 2020-02-26 22:45:42 +0900 | [diff] [blame] | 23 | StubsVersion() string |
Colin Cross | d1f898e | 2020-08-18 18:35:15 -0700 | [diff] [blame] | 24 | SetAllStubsVersions([]string) |
| 25 | AllStubsVersions() []string |
Ivan Lozano | 52767be | 2019-10-18 14:49:46 -0700 | [diff] [blame] | 26 | HasStubsVariants() bool |
| 27 | SelectedStl() string |
| 28 | ApiLevel() string |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 29 | |
| 30 | BuildStaticVariant() bool |
| 31 | BuildSharedVariant() bool |
| 32 | SetStatic() |
| 33 | SetShared() |
Ivan Lozano | 52767be | 2019-10-18 14:49:46 -0700 | [diff] [blame] | 34 | Static() bool |
| 35 | Shared() bool |
| 36 | Toc() android.OptionalPath |
| 37 | |
Jooyung Han | 624d35c | 2020-04-10 12:57:24 +0900 | [diff] [blame] | 38 | Host() bool |
| 39 | |
Yifan Hong | 1b3348d | 2020-01-21 15:53:22 -0800 | [diff] [blame] | 40 | InRamdisk() bool |
| 41 | OnlyInRamdisk() bool |
| 42 | |
Ivan Lozano | 52767be | 2019-10-18 14:49:46 -0700 | [diff] [blame] | 43 | InRecovery() bool |
| 44 | OnlyInRecovery() bool |
| 45 | |
Colin Cross | c511bc5 | 2020-04-07 16:50:32 +0000 | [diff] [blame] | 46 | UseSdk() bool |
Ivan Lozano | 52767be | 2019-10-18 14:49:46 -0700 | [diff] [blame] | 47 | UseVndk() bool |
| 48 | MustUseVendorVariant() bool |
| 49 | IsVndk() bool |
| 50 | HasVendorVariant() bool |
| 51 | |
| 52 | SdkVersion() string |
Colin Cross | c511bc5 | 2020-04-07 16:50:32 +0000 | [diff] [blame] | 53 | AlwaysSdk() bool |
Jiyong Park | 2286afd | 2020-06-16 21:58:53 +0900 | [diff] [blame] | 54 | IsSdkVariant() bool |
Ivan Lozano | 52767be | 2019-10-18 14:49:46 -0700 | [diff] [blame] | 55 | |
| 56 | ToolchainLibrary() bool |
| 57 | NdkPrebuiltStl() bool |
| 58 | StubDecorator() bool |
Colin Cross | 1348ce3 | 2020-10-01 13:37:16 -0700 | [diff] [blame] | 59 | |
| 60 | SplitPerApiLevel() bool |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 61 | } |
| 62 | |
Colin Cross | 6e511a9 | 2020-07-27 21:26:48 -0700 | [diff] [blame] | 63 | var ( |
| 64 | CrtBeginDepTag = dependencyTag{name: "crtbegin"} |
| 65 | CrtEndDepTag = dependencyTag{name: "crtend"} |
| 66 | CoverageDepTag = dependencyTag{name: "coverage"} |
| 67 | ) |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 68 | |
Colin Cross | 6e511a9 | 2020-07-27 21:26:48 -0700 | [diff] [blame] | 69 | func SharedDepTag() blueprint.DependencyTag { |
| 70 | return libraryDependencyTag{Kind: sharedLibraryDependency} |
Ivan Lozano | 183a321 | 2019-10-18 14:18:45 -0700 | [diff] [blame] | 71 | } |
| 72 | |
Colin Cross | 6e511a9 | 2020-07-27 21:26:48 -0700 | [diff] [blame] | 73 | func StaticDepTag() blueprint.DependencyTag { |
| 74 | return libraryDependencyTag{Kind: staticLibraryDependency} |
| 75 | } |
Colin Cross | 0de8a1e | 2020-09-18 14:15:30 -0700 | [diff] [blame] | 76 | |
| 77 | type SharedLibraryInfo struct { |
| 78 | SharedLibrary android.Path |
| 79 | UnstrippedSharedLibrary android.Path |
| 80 | |
| 81 | TableOfContents android.OptionalPath |
| 82 | CoverageSharedLibrary android.OptionalPath |
| 83 | |
| 84 | StaticAnalogue *StaticLibraryInfo |
| 85 | } |
| 86 | |
| 87 | var SharedLibraryInfoProvider = blueprint.NewProvider(SharedLibraryInfo{}) |
| 88 | |
| 89 | type SharedLibraryImplementationStubsInfo struct { |
| 90 | SharedLibraryStubsInfos []SharedLibraryStubsInfo |
| 91 | |
| 92 | IsLLNDK bool |
| 93 | } |
| 94 | |
| 95 | var SharedLibraryImplementationStubsInfoProvider = blueprint.NewProvider(SharedLibraryImplementationStubsInfo{}) |
| 96 | |
| 97 | type SharedLibraryStubsInfo struct { |
| 98 | Version string |
| 99 | SharedLibraryInfo SharedLibraryInfo |
| 100 | FlagExporterInfo FlagExporterInfo |
| 101 | } |
| 102 | |
| 103 | var SharedLibraryStubsInfoProvider = blueprint.NewProvider(SharedLibraryStubsInfo{}) |
| 104 | |
| 105 | type StaticLibraryInfo struct { |
| 106 | StaticLibrary android.Path |
| 107 | Objects Objects |
| 108 | ReuseObjects Objects |
| 109 | |
| 110 | // This isn't the actual transitive DepSet, shared library dependencies have been |
| 111 | // converted into static library analogues. It is only used to order the static |
| 112 | // library dependencies that were specified for the current module. |
| 113 | TransitiveStaticLibrariesForOrdering *android.DepSet |
| 114 | } |
| 115 | |
| 116 | var StaticLibraryInfoProvider = blueprint.NewProvider(StaticLibraryInfo{}) |
| 117 | |
| 118 | type FlagExporterInfo struct { |
| 119 | IncludeDirs android.Paths |
| 120 | SystemIncludeDirs android.Paths |
| 121 | Flags []string |
| 122 | Deps android.Paths |
| 123 | GeneratedHeaders android.Paths |
| 124 | } |
| 125 | |
| 126 | var FlagExporterInfoProvider = blueprint.NewProvider(FlagExporterInfo{}) |