blob: a009c6c7c363234a45a3e20bd6b43da7bdc4dd29 [file] [log] [blame]
Ivan Lozano183a3212019-10-18 14:18:45 -07001package cc
2
3import (
Ivan Lozano183a3212019-10-18 14:18:45 -07004 "android/soong/android"
Ivan Lozano0f9963e2023-02-06 13:31:02 -05005 "android/soong/fuzz"
Kiyoung Kim48f37782021-07-07 12:42:39 +09006 "android/soong/snapshot"
Colin Cross6e511a92020-07-27 21:26:48 -07007
8 "github.com/google/blueprint"
Ivan Lozano183a3212019-10-18 14:18:45 -07009)
10
Ivan Lozano3968d8f2020-12-14 11:27:52 -050011// PlatformSanitizeable is an interface for sanitizing platform modules.
12type PlatformSanitizeable interface {
13 LinkableInterface
14
15 // SanitizePropDefined returns whether the Sanitizer properties struct for this module is defined.
16 SanitizePropDefined() bool
17
Ivan Lozano3968d8f2020-12-14 11:27:52 -050018 // IsSanitizerEnabled returns whether a sanitizer is enabled.
19 IsSanitizerEnabled(t SanitizerType) bool
20
21 // IsSanitizerExplicitlyDisabled returns whether a sanitizer has been explicitly disabled (set to false) rather
22 // than left undefined.
23 IsSanitizerExplicitlyDisabled(t SanitizerType) bool
24
Ivan Lozano3968d8f2020-12-14 11:27:52 -050025 // SetSanitizer enables or disables the specified sanitizer type if it's supported, otherwise this should panic.
26 SetSanitizer(t SanitizerType, b bool)
27
Ivan Lozano3968d8f2020-12-14 11:27:52 -050028 // StaticallyLinked returns true if the module is statically linked.
29 StaticallyLinked() bool
30
31 // SetInSanitizerDir sets the module installation to the sanitizer directory.
32 SetInSanitizerDir()
33
34 // SanitizeNever returns true if this module should never be sanitized.
35 SanitizeNever() bool
36
37 // SanitizerSupported returns true if a sanitizer type is supported by this modules compiler.
38 SanitizerSupported(t SanitizerType) bool
39
Ivan Lozanod7586b62021-04-01 09:49:36 -040040 // MinimalRuntimeDep returns true if this module needs to link the minimal UBSan runtime,
41 // either because it requires it or because a dependent module which requires it to be linked in this module.
42 MinimalRuntimeDep() bool
43
44 // UbsanRuntimeDep returns true if this module needs to link the full UBSan runtime,
45 // either because it requires it or because a dependent module which requires it to be linked in this module.
46 UbsanRuntimeDep() bool
47
48 // UbsanRuntimeNeeded returns true if the full UBSan runtime is required by this module.
49 UbsanRuntimeNeeded() bool
50
51 // MinimalRuntimeNeeded returns true if the minimal UBSan runtime is required by this module
52 MinimalRuntimeNeeded() bool
53
Ivan Lozano3968d8f2020-12-14 11:27:52 -050054 // SanitizableDepTagChecker returns a SantizableDependencyTagChecker function type.
55 SanitizableDepTagChecker() SantizableDependencyTagChecker
56}
57
58// SantizableDependencyTagChecker functions check whether or not a dependency
59// tag can be sanitized. These functions should return true if the tag can be
60// sanitized, otherwise they should return false. These functions should also
61// handle all possible dependency tags in the dependency tree. For example,
62// Rust modules can depend on both Rust and CC libraries, so the Rust module
63// implementation should handle tags from both.
64type SantizableDependencyTagChecker func(tag blueprint.DependencyTag) bool
65
Ivan Lozanod7586b62021-04-01 09:49:36 -040066// Snapshottable defines those functions necessary for handling module snapshots.
67type Snapshottable interface {
Kiyoung Kim48f37782021-07-07 12:42:39 +090068 snapshot.VendorSnapshotModuleInterface
69 snapshot.RecoverySnapshotModuleInterface
70
Ivan Lozanod7586b62021-04-01 09:49:36 -040071 // SnapshotHeaders returns a list of header paths provided by this module.
72 SnapshotHeaders() android.Paths
73
Ivan Lozanod7586b62021-04-01 09:49:36 -040074 // SnapshotLibrary returns true if this module is a snapshot library.
75 IsSnapshotLibrary() bool
76
Justin Yun885a7de2021-06-29 20:34:53 +090077 // EffectiveLicenseFiles returns the list of License files for this module.
78 EffectiveLicenseFiles() android.Paths
79
Ivan Lozanod7586b62021-04-01 09:49:36 -040080 // SnapshotRuntimeLibs returns a list of libraries needed by this module at runtime but which aren't build dependencies.
81 SnapshotRuntimeLibs() []string
82
83 // SnapshotSharedLibs returns the list of shared library dependencies for this module.
84 SnapshotSharedLibs() []string
85
Justin Yun5e035862021-06-29 20:50:37 +090086 // SnapshotStaticLibs returns the list of static library dependencies for this module.
87 SnapshotStaticLibs() []string
88
Ivan Lozanoadd122a2023-07-13 11:01:41 -040089 // SnapshotDylibs returns the list of dylib library dependencies for this module.
90 SnapshotDylibs() []string
91
92 // SnapshotRlibs returns the list of rlib library dependencies for this module.
93 SnapshotRlibs() []string
94
Ivan Lozanod7586b62021-04-01 09:49:36 -040095 // IsSnapshotPrebuilt returns true if this module is a snapshot prebuilt.
96 IsSnapshotPrebuilt() bool
Ivan Lozano5467a392023-08-23 14:20:25 -040097
98 // IsSnapshotSanitizer returns true if this snapshot module implements SnapshotSanitizer.
99 IsSnapshotSanitizer() bool
100
101 // IsSnapshotSanitizerAvailable returns true if this snapshot module has a sanitizer source available (cfi, hwasan).
102 IsSnapshotSanitizerAvailable(t SanitizerType) bool
103
104 // SetSnapshotSanitizerVariation sets the sanitizer variation type for this snapshot module.
105 SetSnapshotSanitizerVariation(t SanitizerType, enabled bool)
106
107 // IsSnapshotUnsanitizedVariant returns true if this is the unsanitized snapshot module variant.
108 IsSnapshotUnsanitizedVariant() bool
Ivan Lozanod7586b62021-04-01 09:49:36 -0400109}
110
Chris Parsons3c27ca32020-11-20 12:42:07 -0500111// LinkableInterface is an interface for a type of module that is linkable in a C++ library.
Ivan Lozano183a3212019-10-18 14:18:45 -0700112type LinkableInterface interface {
Ivan Lozanof9e21722020-12-02 09:00:51 -0500113 android.Module
Ivan Lozanod7586b62021-04-01 09:49:36 -0400114 Snapshottable
Ivan Lozanof9e21722020-12-02 09:00:51 -0500115
Ivan Lozano183a3212019-10-18 14:18:45 -0700116 Module() android.Module
117 CcLibrary() bool
118 CcLibraryInterface() bool
119
Ivan Lozano61c02cc2023-06-09 14:06:44 -0400120 // RustLibraryInterface returns true if this is a Rust library module
121 RustLibraryInterface() bool
122
Ivan Lozanod7586b62021-04-01 09:49:36 -0400123 // BaseModuleName returns the android.ModuleBase.BaseModuleName() value for this module.
124 BaseModuleName() string
125
Ivan Lozano183a3212019-10-18 14:18:45 -0700126 OutputFile() android.OptionalPath
Ivan Lozano39b0bf02021-10-14 12:22:09 -0400127 UnstrippedOutputFile() android.Path
Ivan Lozanoa0cd8f92020-04-09 09:56:02 -0400128 CoverageFiles() android.Paths
Ivan Lozano183a3212019-10-18 14:18:45 -0700129
Ivan Lozano7f67c2a2022-06-27 16:00:26 -0400130 // CoverageOutputFile returns the output archive of gcno coverage information files.
131 CoverageOutputFile() android.OptionalPath
132
Ivan Lozano2b262972019-11-21 12:30:50 -0800133 NonCcVariants() bool
134
Ivan Lozano52767be2019-10-18 14:49:46 -0700135 SelectedStl() string
Ivan Lozano183a3212019-10-18 14:18:45 -0700136
137 BuildStaticVariant() bool
138 BuildSharedVariant() bool
139 SetStatic()
140 SetShared()
Ivan Lozano3968d8f2020-12-14 11:27:52 -0500141 IsPrebuilt() bool
Ivan Lozano52767be2019-10-18 14:49:46 -0700142 Toc() android.OptionalPath
143
Ivan Lozano0f9963e2023-02-06 13:31:02 -0500144 // IsFuzzModule returns true if this a *_fuzz module.
145 IsFuzzModule() bool
146
147 // FuzzPackagedModule returns the fuzz.FuzzPackagedModule for this module.
148 // Expects that IsFuzzModule returns true.
149 FuzzPackagedModule() fuzz.FuzzPackagedModule
150
151 // FuzzSharedLibraries returns the shared library dependencies for this module.
152 // Expects that IsFuzzModule returns true.
Hamzeh Zawawy38917492023-04-05 22:08:46 +0000153 FuzzSharedLibraries() android.RuleBuilderInstalls
Ivan Lozano0f9963e2023-02-06 13:31:02 -0500154
Yi-Yo Chiang36d8e4e2021-07-02 21:21:13 +0800155 Device() bool
Jooyung Han624d35c2020-04-10 12:57:24 +0900156 Host() bool
157
Yifan Hong1b3348d2020-01-21 15:53:22 -0800158 InRamdisk() bool
159 OnlyInRamdisk() bool
160
Yifan Hong60e0cfb2020-10-21 15:17:56 -0700161 InVendorRamdisk() bool
162 OnlyInVendorRamdisk() bool
163
Ivan Lozano52767be2019-10-18 14:49:46 -0700164 InRecovery() bool
165 OnlyInRecovery() bool
166
Ivan Lozano3968d8f2020-12-14 11:27:52 -0500167 InVendor() bool
168
Colin Crossc511bc52020-04-07 16:50:32 +0000169 UseSdk() bool
Ivan Lozano3a7d0002021-03-30 12:19:36 -0400170
Ivan Lozano7f67c2a2022-06-27 16:00:26 -0400171 // IsNdk returns true if the library is in the configs known NDK list.
172 IsNdk(config android.Config) bool
173
174 // IsStubs returns true if the this is a stubs library.
175 IsStubs() bool
176
Ivan Lozano3a7d0002021-03-30 12:19:36 -0400177 // IsLlndk returns true for both LLNDK (public) and LLNDK-private libs.
178 IsLlndk() bool
179
180 // IsLlndkPublic returns true only for LLNDK (public) libs.
181 IsLlndkPublic() bool
182
Ivan Lozanod7586b62021-04-01 09:49:36 -0400183 // HasLlndkStubs returns true if this library has a variant that will build LLNDK stubs.
184 HasLlndkStubs() bool
185
Colin Cross1f3f1302021-04-26 18:37:44 -0700186 // NeedsLlndkVariants returns true if this module has LLNDK stubs or provides LLNDK headers.
187 NeedsLlndkVariants() bool
Ivan Lozano3a7d0002021-03-30 12:19:36 -0400188
Colin Cross5271fea2021-04-27 13:06:04 -0700189 // NeedsVendorPublicLibraryVariants returns true if this module has vendor public library stubs.
190 NeedsVendorPublicLibraryVariants() bool
191
Ivan Lozanod7586b62021-04-01 09:49:36 -0400192 //StubsVersion returns the stubs version for this module.
193 StubsVersion() string
194
195 // UseVndk returns true if the module is using VNDK libraries instead of the libraries in /system/lib or /system/lib64.
196 // "product" and "vendor" variant modules return true for this function.
197 // When BOARD_VNDK_VERSION is set, vendor variants of "vendor_available: true", "vendor: true",
198 // "soc_specific: true" and more vendor installed modules are included here.
199 // When PRODUCT_PRODUCT_VNDK_VERSION is set, product variants of "vendor_available: true" or
200 // "product_specific: true" modules are included here.
Ivan Lozano52767be2019-10-18 14:49:46 -0700201 UseVndk() bool
Ivan Lozanod7586b62021-04-01 09:49:36 -0400202
Jiyong Park7d55b612021-06-11 17:22:09 +0900203 // Bootstrap tests if this module is allowed to use non-APEX version of libraries.
204 Bootstrap() bool
205
Ivan Lozanod7586b62021-04-01 09:49:36 -0400206 // IsVndkSp returns true if this is a VNDK-SP module.
207 IsVndkSp() bool
208
Ivan Lozano52767be2019-10-18 14:49:46 -0700209 MustUseVendorVariant() bool
210 IsVndk() bool
Ivan Lozanof9e21722020-12-02 09:00:51 -0500211 IsVndkExt() bool
Colin Cross127bb8b2020-12-16 16:46:01 -0800212 IsVndkPrivate() bool
Ivan Lozanof1868af2022-04-12 13:08:36 -0400213 IsVendorPublicLibrary() bool
214 IsVndkPrebuiltLibrary() bool
Ivan Lozano52767be2019-10-18 14:49:46 -0700215 HasVendorVariant() bool
Justin Yuncbca3732021-02-03 19:24:13 +0900216 HasProductVariant() bool
217 HasNonSystemVariants() bool
Ivan Lozanof1868af2022-04-12 13:08:36 -0400218 ProductSpecific() bool
Ivan Lozanof9e21722020-12-02 09:00:51 -0500219 InProduct() bool
Ivan Lozanof1868af2022-04-12 13:08:36 -0400220 SdkAndPlatformVariantVisibleToMake() bool
Ivan Lozano52767be2019-10-18 14:49:46 -0700221
Ivan Lozanoc08897c2021-04-02 12:41:32 -0400222 // SubName returns the modules SubName, used for image and NDK/SDK variations.
223 SubName() string
224
Ivan Lozano52767be2019-10-18 14:49:46 -0700225 SdkVersion() string
Jiyong Parkfdaa5f72021-03-19 22:18:04 +0900226 MinSdkVersion() string
Colin Crossc511bc52020-04-07 16:50:32 +0000227 AlwaysSdk() bool
Jiyong Park2286afd2020-06-16 21:58:53 +0900228 IsSdkVariant() bool
Ivan Lozano52767be2019-10-18 14:49:46 -0700229
Colin Cross1348ce32020-10-01 13:37:16 -0700230 SplitPerApiLevel() bool
Ivan Lozano3968d8f2020-12-14 11:27:52 -0500231
232 // SetPreventInstall sets the PreventInstall property to 'true' for this module.
233 SetPreventInstall()
234 // SetHideFromMake sets the HideFromMake property to 'true' for this module.
235 SetHideFromMake()
Ivan Lozano3a7d0002021-03-30 12:19:36 -0400236
237 // KernelHeadersDecorator returns true if this is a kernel headers decorator module.
238 // This is specific to cc and should always return false for all other packages.
239 KernelHeadersDecorator() bool
Ivan Lozanod7586b62021-04-01 09:49:36 -0400240
241 // HiddenFromMake returns true if this module is hidden from Make.
242 HiddenFromMake() bool
243
244 // RelativeInstallPath returns the relative install path for this module.
245 RelativeInstallPath() string
246
247 // Binary returns true if this is a binary module.
248 Binary() bool
249
250 // Object returns true if this is an object module.
251 Object() bool
252
253 // Rlib returns true if this is an rlib module.
254 Rlib() bool
255
256 // Dylib returns true if this is an dylib module.
257 Dylib() bool
258
Ivan Lozanoadd122a2023-07-13 11:01:41 -0400259 // RlibStd returns true if this is an rlib which links against an rlib libstd.
260 RlibStd() bool
261
Ivan Lozanod7586b62021-04-01 09:49:36 -0400262 // Static returns true if this is a static library module.
263 Static() bool
264
265 // Shared returns true if this is a shared library module.
266 Shared() bool
267
268 // Header returns true if this is a library headers module.
269 Header() bool
270
Justin Yun5e035862021-06-29 20:50:37 +0900271 // StaticExecutable returns true if this is a binary module with "static_executable: true".
272 StaticExecutable() bool
273
Ivan Lozanod7586b62021-04-01 09:49:36 -0400274 // EverInstallable returns true if the module is ever installable
275 EverInstallable() bool
276
277 // PreventInstall returns true if this module is prevented from installation.
278 PreventInstall() bool
279
280 // InstallInData returns true if this module is installed in data.
281 InstallInData() bool
282
283 // Installable returns a bool pointer to the module installable property.
284 Installable() *bool
285
286 // Symlinks returns a list of symlinks that should be created for this module.
287 Symlinks() []string
288
289 // VndkVersion returns the VNDK version string for this module.
290 VndkVersion() string
Jihoon Kangf78a8902022-09-01 22:47:07 +0000291
292 // Partition returns the partition string for this module.
293 Partition() string
Ivan Lozano0f9963e2023-02-06 13:31:02 -0500294
295 // FuzzModule returns the fuzz.FuzzModule associated with the module.
296 FuzzModuleStruct() fuzz.FuzzModule
Ivan Lozano183a3212019-10-18 14:18:45 -0700297}
298
Colin Cross6e511a92020-07-27 21:26:48 -0700299var (
Chris Parsons3c27ca32020-11-20 12:42:07 -0500300 // Dependency tag for crtbegin, an object file responsible for initialization.
Colin Cross6e511a92020-07-27 21:26:48 -0700301 CrtBeginDepTag = dependencyTag{name: "crtbegin"}
Chris Parsons3c27ca32020-11-20 12:42:07 -0500302 // Dependency tag for crtend, an object file responsible for program termination.
303 CrtEndDepTag = dependencyTag{name: "crtend"}
304 // Dependency tag for coverage library.
Colin Cross6e511a92020-07-27 21:26:48 -0700305 CoverageDepTag = dependencyTag{name: "coverage"}
306)
Ivan Lozano183a3212019-10-18 14:18:45 -0700307
Ivan Lozano3968d8f2020-12-14 11:27:52 -0500308// GetImageVariantType returns the ImageVariantType string value for the given module
309// (these are defined in cc/image.go).
310func GetImageVariantType(c LinkableInterface) ImageVariantType {
311 if c.Host() {
312 return hostImageVariant
313 } else if c.InVendor() {
314 return vendorImageVariant
315 } else if c.InProduct() {
316 return productImageVariant
317 } else if c.InRamdisk() {
318 return ramdiskImageVariant
319 } else if c.InVendorRamdisk() {
320 return vendorRamdiskImageVariant
321 } else if c.InRecovery() {
322 return recoveryImageVariant
323 } else {
324 return coreImageVariant
325 }
326}
327
Ivan Lozanoc08897c2021-04-02 12:41:32 -0400328// DepTagMakeSuffix returns the makeSuffix value of a particular library dependency tag.
329// Returns an empty string if not a library dependency tag.
330func DepTagMakeSuffix(depTag blueprint.DependencyTag) string {
331 if libDepTag, ok := depTag.(libraryDependencyTag); ok {
332 return libDepTag.makeSuffix
333 }
334 return ""
335}
336
Chris Parsons3c27ca32020-11-20 12:42:07 -0500337// SharedDepTag returns the dependency tag for any C++ shared libraries.
Colin Cross6e511a92020-07-27 21:26:48 -0700338func SharedDepTag() blueprint.DependencyTag {
339 return libraryDependencyTag{Kind: sharedLibraryDependency}
Ivan Lozano183a3212019-10-18 14:18:45 -0700340}
341
Chris Parsons3c27ca32020-11-20 12:42:07 -0500342// StaticDepTag returns the dependency tag for any C++ static libraries.
Ivan Lozano63bb7682021-03-23 15:53:44 -0400343func StaticDepTag(wholeStatic bool) blueprint.DependencyTag {
344 return libraryDependencyTag{Kind: staticLibraryDependency, wholeStatic: wholeStatic}
345}
346
347// IsWholeStaticLib whether a dependency tag is a whole static library dependency.
348func IsWholeStaticLib(depTag blueprint.DependencyTag) bool {
349 if tag, ok := depTag.(libraryDependencyTag); ok {
350 return tag.wholeStatic
351 }
352 return false
Colin Cross6e511a92020-07-27 21:26:48 -0700353}
Colin Cross0de8a1e2020-09-18 14:15:30 -0700354
Chris Parsons3c27ca32020-11-20 12:42:07 -0500355// HeaderDepTag returns the dependency tag for any C++ "header-only" libraries.
Zach Johnson3df4e632020-11-06 11:56:27 -0800356func HeaderDepTag() blueprint.DependencyTag {
357 return libraryDependencyTag{Kind: headerLibraryDependency}
358}
359
Chris Parsons3c27ca32020-11-20 12:42:07 -0500360// SharedLibraryInfo is a provider to propagate information about a shared C++ library.
Colin Cross0de8a1e2020-09-18 14:15:30 -0700361type SharedLibraryInfo struct {
Liz Kammeref6dfea2021-06-08 15:37:09 -0400362 SharedLibrary android.Path
363 Target android.Target
Colin Cross0de8a1e2020-09-18 14:15:30 -0700364
Liz Kammeref6dfea2021-06-08 15:37:09 -0400365 TableOfContents android.OptionalPath
Colin Cross0de8a1e2020-09-18 14:15:30 -0700366
Liz Kammeref6dfea2021-06-08 15:37:09 -0400367 // should be obtained from static analogue
Colin Crossc85750b2022-04-21 12:50:51 -0700368 TransitiveStaticLibrariesForOrdering *android.DepSet[android.Path]
Colin Cross0de8a1e2020-09-18 14:15:30 -0700369}
370
Colin Crossbc7d76c2023-12-12 16:39:03 -0800371var SharedLibraryInfoProvider = blueprint.NewProvider[SharedLibraryInfo]()
Colin Cross0de8a1e2020-09-18 14:15:30 -0700372
Chris Parsons3c27ca32020-11-20 12:42:07 -0500373// SharedStubLibrary is a struct containing information about a stub shared library.
374// Stub libraries are used for cross-APEX dependencies; when a library is to depend on a shared
375// library in another APEX, it must depend on the stub version of that library.
376type SharedStubLibrary struct {
377 // The version of the stub (corresponding to the stable version of the shared library being
378 // stubbed).
Colin Cross0de8a1e2020-09-18 14:15:30 -0700379 Version string
380 SharedLibraryInfo SharedLibraryInfo
381 FlagExporterInfo FlagExporterInfo
382}
383
Chris Parsons3c27ca32020-11-20 12:42:07 -0500384// SharedLibraryStubsInfo is a provider to propagate information about all shared library stubs
385// which are dependencies of a library.
386// Stub libraries are used for cross-APEX dependencies; when a library is to depend on a shared
387// library in another APEX, it must depend on the stub version of that library.
388type SharedLibraryStubsInfo struct {
389 SharedStubLibraries []SharedStubLibrary
Colin Cross0de8a1e2020-09-18 14:15:30 -0700390
Chris Parsons3c27ca32020-11-20 12:42:07 -0500391 IsLLNDK bool
392}
393
Colin Crossbc7d76c2023-12-12 16:39:03 -0800394var SharedLibraryStubsProvider = blueprint.NewProvider[SharedLibraryStubsInfo]()
Chris Parsons3c27ca32020-11-20 12:42:07 -0500395
396// StaticLibraryInfo is a provider to propagate information about a static C++ library.
Colin Cross0de8a1e2020-09-18 14:15:30 -0700397type StaticLibraryInfo struct {
398 StaticLibrary android.Path
399 Objects Objects
400 ReuseObjects Objects
401
Colin Crossa2bcf2c2022-02-11 13:11:55 -0800402 // A static library may contain prebuilt static libraries included with whole_static_libs
403 // that won't appear in Objects. They are transitively available in
404 // WholeStaticLibsFromPrebuilts.
405 WholeStaticLibsFromPrebuilts android.Paths
406
Colin Cross0de8a1e2020-09-18 14:15:30 -0700407 // This isn't the actual transitive DepSet, shared library dependencies have been
408 // converted into static library analogues. It is only used to order the static
409 // library dependencies that were specified for the current module.
Colin Crossc85750b2022-04-21 12:50:51 -0700410 TransitiveStaticLibrariesForOrdering *android.DepSet[android.Path]
Colin Cross0de8a1e2020-09-18 14:15:30 -0700411}
412
Colin Crossbc7d76c2023-12-12 16:39:03 -0800413var StaticLibraryInfoProvider = blueprint.NewProvider[StaticLibraryInfo]()
Colin Cross0de8a1e2020-09-18 14:15:30 -0700414
Colin Cross649d8172020-12-10 12:30:21 -0800415// HeaderLibraryInfo is a marker provider that identifies a module as a header library.
416type HeaderLibraryInfo struct {
417}
418
419// HeaderLibraryInfoProvider is a marker provider that identifies a module as a header library.
Colin Crossbc7d76c2023-12-12 16:39:03 -0800420var HeaderLibraryInfoProvider = blueprint.NewProvider[HeaderLibraryInfo]()
Colin Cross649d8172020-12-10 12:30:21 -0800421
Chris Parsons3c27ca32020-11-20 12:42:07 -0500422// FlagExporterInfo is a provider to propagate transitive library information
423// pertaining to exported include paths and flags.
Colin Cross0de8a1e2020-09-18 14:15:30 -0700424type FlagExporterInfo struct {
Chris Parsons3c27ca32020-11-20 12:42:07 -0500425 IncludeDirs android.Paths // Include directories to be included with -I
426 SystemIncludeDirs android.Paths // System include directories to be included with -isystem
427 Flags []string // Exported raw flags.
Colin Cross0de8a1e2020-09-18 14:15:30 -0700428 Deps android.Paths
429 GeneratedHeaders android.Paths
430}
431
Colin Crossbc7d76c2023-12-12 16:39:03 -0800432var FlagExporterInfoProvider = blueprint.NewProvider[FlagExporterInfo]()