Merge "Add `sdk_version: "minimum"`."
This commit is contained in:
commit
fe7f2f393b
|
@ -130,6 +130,16 @@ func normalizeNdkApiLevel(apiLevel string, arch android.Arch) (string, error) {
|
|||
"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 @@ func normalizeNdkApiLevel(apiLevel string, arch android.Arch) (string, error) {
|
|||
}
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue