8b2513a986
This CL creates a new build target with a customized set of GN flags that enable the native components of SkQP to be built using NDK APIs. Bug: skia:12777 Change-Id: I8341eafa7fc794cfb759045b7c7238e69c29b0a3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/491447 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
47 lines
1.9 KiB
Python
47 lines
1.9 KiB
Python
# Copyright 2019 Google LLC.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
def GetGNArgs(api_level, debug, arch=None, ndk=None, is_android_bp=False):
|
|
gn_args = {
|
|
'ndk_api': api_level,
|
|
'is_debug': 'true' if debug else 'false',
|
|
'extra_cflags': '[ "-DSK_ENABLE_DUMP_GPU", "-DSK_BUILD_FOR_SKQP" ]',
|
|
'skia_enable_fontmgr_android': 'false',
|
|
'skia_enable_fontmgr_empty': 'true',
|
|
'skia_enable_pdf': 'false',
|
|
'skia_enable_skshaper': 'false',
|
|
'skia_enable_skottie': 'false',
|
|
'skia_enable_skrive': 'false',
|
|
'skia_enable_sktext': 'false',
|
|
'skia_enable_tools': 'true',
|
|
'skia_enable_svg': 'false',
|
|
'skia_tools_require_resources': 'true',
|
|
'skia_use_dng_sdk': 'false',
|
|
'skia_use_expat': 'true',
|
|
'skia_use_freetype': 'false',
|
|
'skia_use_icu': 'false',
|
|
'skia_use_libgifcodec': 'false',
|
|
'skia_use_libheif': 'false',
|
|
'skia_use_lua': 'false',
|
|
'skia_use_piex': 'false',
|
|
'skia_use_vulkan': 'true',
|
|
'skia_use_wuffs': 'true',
|
|
}
|
|
|
|
def gn_quote(s):
|
|
return '"%s"' % s
|
|
|
|
if is_android_bp is True:
|
|
gn_args.update({
|
|
'target_os': gn_quote("android"),
|
|
'target_cpu': gn_quote("none"),
|
|
'is_official_build': 'true',
|
|
})
|
|
else:
|
|
gn_args.update({
|
|
'target_cpu': gn_quote(arch),
|
|
'ndk': gn_quote(ndk),
|
|
})
|
|
return gn_args
|