summaryrefslogtreecommitdiff
path: root/cc/stl.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/stl.go')
-rw-r--r--cc/stl.go20
1 files changed, 2 insertions, 18 deletions
diff --git a/cc/stl.go b/cc/stl.go
index e18fe9547..406fa3a3e 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -17,7 +17,6 @@ package cc
import (
"android/soong/android"
"fmt"
- "strconv"
)
func getNdkStlFamily(m LinkableInterface) string {
@@ -136,23 +135,8 @@ func (stl *stl) begin(ctx BaseModuleContext) {
}
func needsLibAndroidSupport(ctx BaseModuleContext) bool {
- versionStr, err := normalizeNdkApiLevel(ctx, ctx.sdkVersion(), ctx.Arch())
- if err != nil {
- ctx.PropertyErrorf("sdk_version", err.Error())
- }
-
- if versionStr == "current" {
- return false
- }
-
- version, err := strconv.Atoi(versionStr)
- if err != nil {
- panic(fmt.Sprintf(
- "invalid API level returned from normalizeNdkApiLevel: %q",
- versionStr))
- }
-
- return version < 21
+ version := nativeApiLevelOrPanic(ctx, ctx.sdkVersion())
+ return version.LessThan(android.FirstNonLibAndroidSupportVersion)
}
func staticUnwinder(ctx android.BaseModuleContext) string {