summaryrefslogtreecommitdiff
path: root/cc/cc.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go24
1 files changed, 17 insertions, 7 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 36f04624e..449d38f33 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -68,16 +68,14 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) {
ctx.TopDown("fuzz_deps", fuzzMutatorDeps)
- ctx.BottomUp("coverage", coverageMutator).Parallel()
+ ctx.Transition("coverage", &coverageTransitionMutator{})
ctx.TopDown("afdo_deps", afdoDepsMutator)
ctx.BottomUp("afdo", afdoMutator).Parallel()
- ctx.TopDown("orderfile_deps", orderfileDepsMutator)
- ctx.BottomUp("orderfile", orderfileMutator).Parallel()
+ ctx.Transition("orderfile", &orderfileTransitionMutator{})
- ctx.TopDown("lto_deps", ltoDepsMutator)
- ctx.BottomUp("lto", ltoMutator).Parallel()
+ ctx.Transition("lto", &ltoTransitionMutator{})
ctx.BottomUp("check_linktype", checkLinkTypeMutator).Parallel()
ctx.TopDown("double_loadable", checkDoubleLoadableLibraries).Parallel()
@@ -1608,9 +1606,10 @@ func (ctx *moduleContextImpl) useSdk() bool {
func (ctx *moduleContextImpl) sdkVersion() string {
if ctx.ctx.Device() {
- if ctx.useVndk() {
+ config := ctx.ctx.Config()
+ if !config.IsVndkDeprecated() && ctx.useVndk() {
vndkVer := ctx.mod.VndkVersion()
- if inList(vndkVer, ctx.ctx.Config().PlatformVersionActiveCodenames()) {
+ if inList(vndkVer, config.PlatformVersionActiveCodenames()) {
return "current"
}
return vndkVer
@@ -1628,6 +1627,17 @@ func (ctx *moduleContextImpl) minSdkVersion() string {
if ver == "apex_inherit" || ver == "" {
ver = ctx.sdkVersion()
}
+
+ if ctx.ctx.Device() {
+ config := ctx.ctx.Config()
+ if config.IsVndkDeprecated() && ctx.inVendor() {
+ // If building for vendor with final API, then use the latest _stable_ API as "current".
+ if config.VendorApiLevelFrozen() && (ver == "" || ver == "current") {
+ ver = config.PlatformSdkVersion().String()
+ }
+ }
+ }
+
// For crt objects, the meaning of min_sdk_version is very different from other types of
// module. For them, min_sdk_version defines the oldest version that the build system will
// create versioned variants for. For example, if min_sdk_version is 16, then sdk variant of