diff options
Diffstat (limited to 'cc/cc.go')
-rw-r--r-- | cc/cc.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1445,6 +1445,8 @@ func isBionic(name string) bool { } func InstallToBootstrap(name string, config android.Config) bool { + // NOTE: also update //build/bazel/rules/apex/cc.bzl#_installed_to_bootstrap + // if this list is updated. if name == "libclang_rt.hwasan" { return true } @@ -2225,6 +2227,13 @@ func GetCrtVariations(ctx android.BottomUpMutatorContext, if err != nil { ctx.PropertyErrorf("min_sdk_version", err.Error()) } + + // Raise the minSdkVersion to the minimum supported for the architecture. + minApiForArch := MinApiForArch(ctx, m.Target().Arch.ArchType) + if apiLevel.LessThan(minApiForArch) { + apiLevel = minApiForArch + } + return []blueprint.Variation{ {Mutator: "sdk", Variation: "sdk"}, {Mutator: "version", Variation: apiLevel.String()}, @@ -3706,7 +3715,7 @@ func (c *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext, // This allows introducing new architectures in the platform that // need to be included in apexes that normally require an older // min_sdk_version. - minApiForArch := minApiForArch(ctx, c.Target().Arch.ArchType) + minApiForArch := MinApiForArch(ctx, c.Target().Arch.ArchType) if sdkVersion.LessThan(minApiForArch) { sdkVersion = minApiForArch } |