angle/android/angle_apk.gni

113 строки
3.8 KiB
Plaintext
Исходник Обычный вид История

# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
import("../gni/angle.gni")
Reland "Vulkan: Use VK repos' internal BUILD.gn files" This is a reland of 552f5fcb0d8fcc615856ce3b678190e1cbdd38e6 There was a missing build dependence causing a build no-op issue which has now been fixed in the upstream Vulkan Validation Layer repo. Primary workaround that need to be re-visted and fixed are: 1. Disabled validation layers on 32-bit Windows 2. Disabled validation layers on 32-bit Android 3. Disabled DebugUtils on Android, using DebugReport instead 4. Using custom VK Loader branch to avoid WDK dependence Original change's description: > Vulkan: Use VK repos' internal BUILD.gn files > > This retires custom BUILD.gn files for the Vulkan Headers, Tools, > Validation-Layers, and Loader repos. They now have integrated BUILD.gn > files so switched ANGLE to use those by default. > Also Validation Layer, Loader, and Tools repos no longer uses codegen > so this speeds up the build overall. > Switched over from old VK_LAYER_LUNARG_standard_validation meta-layer > to VK_LAYER_KHRONOS_validation unified layer. > > This changes includes a temporary workaround to the Vulkan-Loader repo > to remove its Window's build dependence on WDK. There are plans to > remove that depenedence in Loader master, but until then we can use > our custom branch workaround. > It also includes a custom branch for validation layers that includes > some build fixes for ANGLE. > Finally, the layers were crashing on Android when attempting to use > DebugUtils extension so forcing DebugReport on Android for now. > > Bug: angleproject:2449 > Bug: angleproject:3320 > Bug: angleproject:3852 > Bug: angleproject:3924 > Bug: angleproject:3925 > Bug: angleproject:3946 > Bug: chromium:997009 > Bug: chromium:997016 > Change-Id: I48b36acefcc7f2bc930eb72d6fdbc87bca24f833 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610438 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Tobin Ehlis <tobine@google.com> Bug: angleproject:2449, angleproject:3320, angleproject:3852 Change-Id: I373ada091a1329db5e304874079428d01ba21d52 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1778302 Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-07-19 00:10:49 +03:00
vulkan_validation_layers = [ "VkLayer_khronos_validation" ]
angle_libraries = [
"libEGL",
"libGLESv1_CM",
"libGLESv2",
"libfeature_support",
]
if (enable_java_templates) {
template("angle_apk") {
manifest_target_name = "${target_name}__manifest"
manifest_path =
"${target_gen_dir}/${target_name}/android/AndroidManifest.xml"
jinja_template(manifest_target_name) {
input = "${angle_root}/android/AndroidManifest.xml.jinja2"
output = manifest_path
variables = [
"manifest_package=${invoker.package_name}",
"extract_native_libs=${angle_extract_native_libs}",
]
}
android_assets("${invoker.package_name}_assets") {
disable_compression = true
sources = [ "src/feature_support_util/a4a_rules.json" ]
}
android_apk(target_name) {
forward_variables_from(invoker, "*")
android_manifest = manifest_path
android_manifest_dep = ":$manifest_target_name"
version_code = invoker.version_code
version_name = invoker.version_name
min_sdk_version = 26
target_sdk_version = 28
generate_final_jni = false
deps = [ ":${invoker.package_name}_assets" ]
if (symbol_level != 0) {
deps += [ ":compressed_symbols" ]
if (android_64bit_target_cpu) {
deps += [ ":compressed_symbols($android_secondary_abi_toolchain)" ]
}
}
uncompress_shared_libraries = true
if (android_64bit_target_cpu) {
if (symbol_level == 0) {
secondary_abi_shared_libraries = []
foreach(_library, angle_libraries) {
secondary_abi_shared_libraries +=
[ "$angle_root:${_library}($android_secondary_abi_toolchain)" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
secondary_abi_shared_libraries +=
[ "$angle_vulkan_validation_layers_dir:${_layer}" +
"($android_secondary_abi_toolchain)" ]
}
}
} else {
_secondary_out_dir = get_label_info(
":compressed_symbols($android_secondary_abi_toolchain)",
"root_out_dir")
secondary_abi_loadable_modules = []
foreach(_library, angle_libraries) {
secondary_abi_loadable_modules += [ "$_secondary_out_dir/lib.compressed/${_library}${angle_libs_suffix}${shlib_extension}" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
secondary_abi_loadable_modules += [ "${_secondary_out_dir}/lib.compressed/lib${_layer}${shlib_extension}" ]
}
}
}
}
if (symbol_level == 0) {
shared_libraries = []
foreach(_library, angle_libraries) {
shared_libraries += [ "$angle_root:$_library" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
shared_libraries +=
[ "$angle_vulkan_validation_layers_dir:${_layer}" ]
}
}
} else {
loadable_modules = []
foreach(_library, angle_libraries) {
loadable_modules += [ "$root_out_dir/lib.compressed/${_library}${angle_libs_suffix}${shlib_extension}" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
loadable_modules += [
"$root_out_dir/lib.compressed/lib${_layer}${shlib_extension}",
]
}
}
}
}
}
}