Add `sdk_version: "minimum"`.

This maps to the lowest supported API level for the given
architecture.

Test: make checkbuild # after setting some things to use this
Bug: None
Change-Id: Ied6d44cb2719b73f35dde38a2dca6d3c87c7c924
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 6ebd0c4..c28b411 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -130,6 +130,16 @@
 		"x86_64": 21,
 	}
 
+	archStr := arch.ArchType.String()
+	firstArchVersion, ok := firstArchVersions[archStr]
+	if !ok {
+		panic(fmt.Errorf("Arch %q not found in firstArchVersions", archStr))
+	}
+
+	if apiLevel == "minimum" {
+		return strconv.Itoa(firstArchVersion), nil
+	}
+
 	// If the NDK drops support for a platform version, we don't want to have to
 	// fix up every module that was using it as its SDK version. Clip to the
 	// supported version here instead.
@@ -139,12 +149,6 @@
 	}
 	version = intMax(version, minVersion)
 
-	archStr := arch.ArchType.String()
-	firstArchVersion, ok := firstArchVersions[archStr]
-	if !ok {
-		panic(fmt.Errorf("Arch %q not found in firstArchVersions", archStr))
-	}
-
 	return strconv.Itoa(intMax(version, firstArchVersion)), nil
 }