Pass --min_sdk_version to aidl compiler
cc/java modules can have .aidl files as srcs. Pass min_sdk_version to the aidl compiler so that it can check some features against it. For example, ParcelableHolder AIDL type is available since 31. Bug: 205338951 Test: soong test && m Change-Id: I7ecab913e00c9b6a3ce870dacbe9773d2ddb7e93
This commit is contained in:
@@ -552,6 +552,12 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
flags.aidlFlags = append(flags.aidlFlags, "-t")
|
||||
}
|
||||
|
||||
aidlMinSdkVersion := ctx.minSdkVersion()
|
||||
if aidlMinSdkVersion == "" {
|
||||
aidlMinSdkVersion = "platform_apis"
|
||||
}
|
||||
flags.aidlFlags = append(flags.aidlFlags, "--min_sdk_version="+aidlMinSdkVersion)
|
||||
|
||||
flags.Local.CommonFlags = append(flags.Local.CommonFlags,
|
||||
"-I"+android.PathForModuleGen(ctx, "aidl").String())
|
||||
}
|
||||
|
Reference in New Issue
Block a user