Lines Matching refs:a

685 	a, ok := mctx.Module().(*apexBundle)
686 if !ok || a.vndkApex {
691 MinSdkVersion: a.minSdkVersion(mctx),
692 Updatable: a.Updatable(),
695 …useVndk := a.SocSpecific() || a.DeviceSpecific() || (a.ProductSpecific() && mctx.Config().EnforceP…
696 excludeVndkLibs := useVndk && proptools.Bool(a.properties.Use_vndk_as_stable)
697 if !useVndk && proptools.Bool(a.properties.Use_vndk_as_stable) {
796 } else if a, ok := mctx.Module().(*apexBundle); ok && !a.vndkApex {
1090 func (a apexPackaging) suffix() string {
1091 switch a {
1097 panic(fmt.Errorf("unknown APEX type %d", a))
1101 func (a apexPackaging) name() string {
1102 switch a {
1108 panic(fmt.Errorf("unknown APEX type %d", a))
1333 func (a *apexBundle) combineProperties(ctx android.BottomUpMutatorContext) {
1335 …proptools.AppendProperties(&a.properties.Multilib, &a.targetProperties.Target.Android.Multilib, ni…
1337 proptools.AppendProperties(&a.properties.Multilib, &a.targetProperties.Target.Host.Multilib, nil)
1339 …proptools.AppendProperties(&a.properties.Multilib, &a.targetProperties.Target.Linux_bionic.Multili…
1341 …proptools.AppendProperties(&a.properties.Multilib, &a.targetProperties.Target.Linux_glibc.Multilib…
1346 func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
1347 …if proptools.Bool(a.properties.Use_vendor) && !android.InList(a.Name(), useVendorAllowList(ctx.Con…
1353 imageVariation := a.getImageVariation(ctx)
1355 a.combineProperties(ctx)
1368 Native_shared_libs: a.properties.Native_shared_libs,
1369 Tests: a.properties.Tests,
1370 Jni_libs: a.properties.Jni_libs,
1377 a.properties.Multilib.Both,
1390 Binaries: a.properties.Binaries,
1396 a.properties.Multilib.First,
1405 a.properties.Multilib.Lib32,
1410 a.properties.Multilib.Prefer32,
1416 a.properties.Multilib.Lib64,
1422 a.properties.Multilib.Prefer32,
1443 }, prebuiltTag, a.properties.Prebuilts...)
1446 javaLibTag, a.properties.Java_libs...)
1449 if a.artApex && ctx.Config().IsEnvTrue("EMMA_INSTRUMENT_FRAMEWORK") {
1454 if String(a.properties.Key) == "" {
1458 ctx.AddDependency(ctx.Module(), keyTag, String(a.properties.Key))
1460 cert := android.SrcIsModule(a.getCertString(ctx))
1466 if len(a.properties.Uses_sdks) > 0 {
1468 for _, str := range a.properties.Uses_sdks {
1472 a.BuildWithSdks(sdkRefs)
1476 func (a *apexBundle) OverridablePropertiesDepsMutator(ctx android.BottomUpMutatorContext) {
1477 if a.overridableProperties.Allowed_files != nil {
1478 android.ExtractSourceDeps(ctx, a.overridableProperties.Allowed_files)
1481 androidAppTag, a.overridableProperties.Apps...)
1483 rroTag, a.overridableProperties.Rros...)
1486 func (a *apexBundle) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
1491 func (a *apexBundle) getCertString(ctx android.BaseModuleContext) string {
1495 if a.vndkApex {
1502 return String(a.properties.Certificate)
1505 func (a *apexBundle) OutputFiles(tag string) (android.Paths, error) {
1508 return android.Paths{a.outputFile}, nil
1514 func (a *apexBundle) installable() bool {
1515 …return !a.properties.PreventInstall && (a.properties.Installable == nil || proptools.Bool(a.proper…
1518 func (a *apexBundle) testOnlyShouldSkipHashtreeGeneration() bool {
1519 return proptools.Bool(a.properties.Test_only_no_hashtree)
1522 func (a *apexBundle) testOnlyShouldSkipPayloadSign() bool {
1523 return proptools.Bool(a.properties.Test_only_unsigned_payload)
1526 func (a *apexBundle) getImageVariation(ctx android.BottomUpMutatorContext) string {
1528 if a.vndkApex {
1529 return cc.VendorVariationPrefix + a.vndkVersion(deviceConfig)
1535 if proptools.Bool(a.properties.Use_vendor) {
1538 } else if a.SocSpecific() || a.DeviceSpecific() {
1541 } else if a.ProductSpecific() {
1555 func (a *apexBundle) EnableSanitizer(sanitizerName string) {
1556 if !android.InList(sanitizerName, a.properties.SanitizerNames) {
1557 a.properties.SanitizerNames = append(a.properties.SanitizerNames, sanitizerName)
1561 func (a *apexBundle) IsSanitizerEnabled(ctx android.BaseModuleContext, sanitizerName string) bool {
1562 if android.InList(sanitizerName, a.properties.SanitizerNames) {
1568 if a.Host() {
1572 if len(arches) == 0 || android.InList(a.Arch().ArchType.Name, arches) {
1579 func (a *apexBundle) AddSanitizerDependencies(ctx android.BottomUpMutatorContext, sanitizerName str…
1580 …if ctx.Device() && sanitizerName == "hwaddress" && strings.HasPrefix(a.Name(), "com.android.runtim…
1584 {Mutator: "image", Variation: a.getImageVariation(ctx)},
1596 func (a *apexBundle) IsNativeCoverageNeeded(ctx android.BaseModuleContext) bool {
1600 func (a *apexBundle) PreventInstall() {
1601 a.properties.PreventInstall = true
1604 func (a *apexBundle) HideFromMake() {
1605 a.properties.HideFromMake = true
1608 func (a *apexBundle) MarkAsCoverageVariant(coverage bool) {
1609 a.properties.IsCoverageVariant = coverage
1612 func (a *apexBundle) EnableCoverageIfNeeded() {}
1760 if a, ok := rro.(interface {
1763 af.overriddenPackageName = a.OverriddenManifestPackageName()
1778 func (a *apexBundle) WalkPayloadDeps(ctx android.ModuleContext, do android.PayloadDepsCallback) {
1809 func (a *apexBundle) minSdkVersion(ctx android.BaseModuleContext) int {
1810 ver := proptools.String(a.properties.Min_sdk_version)
1832 func (a *apexBundle) Updatable() bool {
1833 return proptools.Bool(a.properties.Updatable)
1839 func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) {
1841 if ctx.Host() || a.testApex || a.vndkApex {
1847 if a.SocSpecific() || a.DeviceSpecific() ||
1848 (a.ProductSpecific() && ctx.Config().EnforceProductPartitionInterface()) {
1855 if ctx.Config().IsEnvTrue("EMMA_INSTRUMENT") || a.IsNativeCoverageNeeded(ctx) {
1859a.WalkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModul…
1885 func (a *apexBundle) checkUpdatable(ctx android.ModuleContext) {
1886 if a.Updatable() {
1887 if String(a.properties.Min_sdk_version) == "" {
1891 a.checkJavaStableSdkVersion(ctx)
1895 func (a *apexBundle) checkMinSdkVersion(ctx android.ModuleContext) {
1896 if a.testApex || a.vndkApex {
1900 if proptools.Bool(a.properties.Use_vendor) && ctx.DeviceConfig().VndkVersion() == "" {
1903 android.CheckMinSdkVersion(a, ctx, a.minSdkVersion(ctx))
1907 func (a *apexBundle) checkStaticLinkingToStubLibraries(ctx android.ModuleContext) {
1909 if ctx.Host() || a.testApex || a.vndkApex {
1913a.WalkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModul…
1951 func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
1953 switch a.properties.ApexType {
1956 a.suffix = imageApexSuffix
1958 a.suffix = ""
1959 a.primaryApexType = true
1962 a.requiredDeps = append(a.requiredDeps, a.Name()+flattenedSuffix)
1966 if proptools.String(a.properties.Payload_type) == "zip" {
1967 a.suffix = ""
1968 a.primaryApexType = true
1970 a.suffix = zipApexSuffix
1974 a.suffix = ""
1975 a.primaryApexType = true
1977 a.suffix = flattenedSuffix
1981 if len(a.properties.Tests) > 0 && !a.testApex {
1986 a.checkApexAvailability(ctx)
1987 a.checkUpdatable(ctx)
1988 a.checkMinSdkVersion(ctx)
1989 a.checkStaticLinkingToStubLibraries(ctx)
1991 handleSpecialLibs := !android.Bool(a.properties.Ignore_system_library_special_case)
1999 useVendor := proptools.Bool(a.properties.Use_vendor)
2040 …if c.HasStubsVariants() && !a.vndkApex && !cc.InstallToBootstrap(c.BaseModuleName(), ctx.Config())…
2059 } else if gb, ok := child.(bootstrap.GoBinaryTool); ok && a.Host() {
2132 a.private_key_file = key.private_key_file
2133 a.public_key_file = key.public_key_file
2140 a.container_certificate_file = dep.Certificate.Pem
2141 a.container_private_key_file = dep.Certificate.Key
2149 a.prebuiltFileToDelete = prebuilt.InstallFilename()
2152 } else if !a.vndkApex {
2164 if cc.UseVndk() && proptools.Bool(a.properties.Use_vndk_as_stable) && cc.IsVndk() {
2170 …if !a.Host() && !android.DirectlyInApex(ctx.ModuleName(), depName) && (cc.IsStubs() || cc.HasStubs…
2181 if proptools.Bool(a.properties.Use_vendor) {
2186 if !android.InList(name, a.requiredDeps) {
2187 a.requiredDeps = append(a.requiredDeps, name)
2228 if a.artApex {
2239 if a.private_key_file == nil {
2240 ctx.PropertyErrorf("key", "private_key for %q could not be found", String(a.properties.Key))
2271 a.installDir = android.PathForModuleInstall(ctx, "apex")
2272 a.filesInfo = filesInfo
2279 a.linkToSystemLib = !ctx.Config().UnbundledBuild() &&
2280 a.installable() &&
2281 !proptools.Bool(a.properties.Use_vendor)
2285 if a.SocSpecific() || a.DeviceSpecific() ||
2286 (a.ProductSpecific() && ctx.Config().EnforceProductPartitionInterface()) {
2287 a.linkToSystemLib = false
2292 if a.Updatable() && a.properties.ApexType == imageApex {
2293 a.linkToSystemLib = false
2298 a.linkToSystemLib = false
2302 a.buildManifest(ctx, provideNativeLibs, requireNativeLibs)
2304 a.buildFileContexts(ctx)
2306 a.setCertificateAndPrivateKey(ctx)
2307 if a.properties.ApexType == flattenedApex {
2308 a.buildFlattenedApex(ctx)
2310 a.buildUnflattenedApex(ctx)
2313 a.compatSymlinks = makeCompatSymlinks(a.BaseModuleName(), ctx)
2315 a.buildApexDependencyInfo(ctx)
2317 a.buildLintReports(ctx)
2321 func (a *apexBundle) checkJavaStableSdkVersion(ctx android.ModuleContext) {