| # Copyright 2019 The Chromium Authors | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//chrome/android/modules/buildflags.gni") | |
| # Enable stack unwinding only on official build with specific channels. It is | |
| # not enabled on non-official builds to not affect build time for developers. | |
| # The unwind file is ~2MB in apk, which is fine for Canary. | |
| add_unwind_tables_in_chrome_32bit_apk = | |
| is_official_build && | |
| (target_cpu == "arm" || | |
| (target_cpu == "arm64" && defined(android_app_secondary_abi))) && | |
| (android_channel == "default" || android_channel == "beta" || | |
| android_channel == "canary" || android_channel == "dev") | |
| stack_unwinder_module_desc = { | |
| name = "stack_unwinder" | |
| android_manifest = "//chrome/android/modules/stack_unwinder/internal/java/AndroidManifest.xml" | |
| java_deps = [ "//chrome/android/modules/stack_unwinder/internal:java" ] | |
| native_deps = [ "//chrome/android/modules/stack_unwinder/internal:native" ] | |
| jni_registration = "//chrome/android/modules/stack_unwinder/internal:stack_unwinder__jni_registration($default_toolchain)" | |
| load_native_on_get_impl = false | |
| include_unwind_assets = add_unwind_tables_in_chrome_32bit_apk | |
| } |