blob: 57974ef42b26ac3131025d37cd0bb4fe6f9535d8 [file] [log] [blame]
# Copyright 2015 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")
declare_args() {
# Whether chrome_public_apk should use the crazy linker.
chrome_public_apk_use_chromium_linker = true
# Whether chrome_public_apk should use the relocation packer.
chrome_public_apk_use_relocation_packer = true
# Whether native libraries should be loaded from within the apk.
chrome_public_apk_load_library_from_apk = true
}
# GYP: //chrome/android/chrome_apk.gypi
template("chrome_public_apk_tmpl") {
android_apk(target_name) {
forward_variables_from(invoker, "*")
_native_lib_file =
rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
if (is_debug) {
enable_multidex = true
} else {
proguard_enabled = true
_prev_proguard_configs = []
if (defined(proguard_configs)) {
_prev_proguard_configs = proguard_configs
}
proguard_configs = []
proguard_configs =
[ "//chrome/android/java/proguard.flags" ] + _prev_proguard_configs
}
if (chromium_linker_supported) {
if (!defined(use_chromium_linker)) {
use_chromium_linker = chrome_public_apk_use_chromium_linker
}
# TODO: Enable packed relocations for x64. See: b/20532404
if (current_cpu != "x64") {
enable_relocation_packing = chrome_public_apk_use_relocation_packer
}
}
}
}