Add Android target API option
authorJesse Hall <jessehall@google.com>
Fri, 4 Aug 2017 21:54:25 +0000 (14:54 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 25 Aug 2017 11:45:56 +0000 (07:45 -0400)
Components: Framework
Change-Id: I9c86d2fac0dcf9067db9276a2096d849ea2775de

scripts/android/build_apk.py

index 11e50e80eaa92e5c8db5a51a061c6bf9c100a9fe..2f86bd8550afcc498ebe0f0f7f1035070f626af9 100644 (file)
@@ -168,12 +168,12 @@ class Environment:
                self.ndk                = ndk
 
 class Configuration:
-       def __init__(self, env, buildPath, abis, nativeBuildType, gtfTarget, verbose):
+       def __init__(self, env, buildPath, abis, nativeApi, nativeBuildType, gtfTarget, verbose):
                self.env                                = env
                self.sourcePath                 = DEQP_DIR
                self.buildPath                  = buildPath
                self.abis                               = abis
-               self.nativeApi                  = 21
+               self.nativeApi                  = nativeApi
                self.javaApi                    = 22
                self.nativeBuildType    = nativeBuildType
                self.gtfTarget                  = gtfTarget
@@ -856,6 +856,11 @@ def parseArgs ():
                dest='abis',
                default=",".join(NDKEnv.getKnownAbis()),
                help="ABIs to build")
+       parser.add_argument('--native-api',
+               type=int,
+               dest='nativeApi',
+               default=21,
+               help="Android API level to target in native code")
        parser.add_argument('--sdk',
                dest='sdkPath',
                default=defaultSDKPath,
@@ -915,7 +920,7 @@ if __name__ == "__main__":
        sdk                     = SDKEnv(os.path.realpath(args.sdkPath))
        buildPath       = os.path.realpath(args.buildRoot)
        env                     = Environment(sdk, ndk)
-       config          = Configuration(env, buildPath, abis=args.abis, nativeBuildType=args.nativeBuildType, gtfTarget=args.gtfTarget, verbose=args.verbose)
+       config          = Configuration(env, buildPath, abis=args.abis, nativeApi=args.nativeApi, nativeBuildType=args.nativeBuildType, gtfTarget=args.gtfTarget, verbose=args.verbose)
 
        try:
                config.check()