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