Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e079dfd authored by Prashanth Swaminathan's avatar Prashanth Swaminathan Committed by Gerrit Code Review
Browse files

Merge "Convert preview sdkVersion to int for target-api" into main

parents 61a27f80 30f7c799
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -101,11 +101,12 @@ func rsGenerateCpp(ctx android.ModuleContext, rsFiles android.Paths, rsFlags str
func rsFlags(ctx ModuleContext, flags Flags, properties *BaseCompilerProperties) Flags {
	targetApi := String(properties.Renderscript.Target_api)
	if targetApi == "" && ctx.useSdk() {
		switch ctx.sdkVersion() {
		case "current", "system_current", "test_current":
			// Nothing
		default:
			targetApi = android.GetNumericSdkVersion(ctx.sdkVersion())
		targetApiLevel := android.ApiLevelOrPanic(ctx, ctx.sdkVersion())
		if targetApiLevel.IsCurrent() || targetApiLevel.IsPreview() {
			// If the target level is current or preview, leave the 'target-api' unset.
			// This signals to llvm-rs-cc that the development API should be used.
		} else {
			targetApi = targetApiLevel.String()
		}
	}