OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/rules.gni") | 5 import("//build/config/android/rules.gni") |
6 | 6 |
7 declare_args() { | 7 declare_args() { |
8 # Whether chrome_public_apk should use the crazy linker. | 8 # Whether chrome_public_apk should use the crazy linker. |
9 chrome_public_apk_use_chromium_linker = true | 9 chrome_public_apk_use_chromium_linker = true |
10 | 10 |
11 # Whether chrome_public_apk should use the relocation packer. | 11 # Whether chrome_public_apk should use the relocation packer. |
12 chrome_public_apk_use_relocation_packer = true | 12 chrome_public_apk_use_relocation_packer = true |
13 | 13 |
14 # Whether native libraries should be loaded from within the apk. | 14 # Whether native libraries should be loaded from within the apk. |
15 chrome_public_apk_load_library_from_apk = true | 15 chrome_public_apk_load_library_from_apk = true |
16 } | 16 } |
17 | 17 |
18 # GYP: //chrome/android/chrome_apk.gypi | 18 # GYP: //chrome/android/chrome_apk.gypi |
19 template("chrome_public_apk_tmpl") { | 19 template("chrome_public_apk_tmpl") { |
20 forward_variables_from(invoker, "*") | |
21 | |
22 android_apk(target_name) { | 20 android_apk(target_name) { |
| 21 forward_variables_from(invoker, "*") |
23 _native_lib_file = | 22 _native_lib_file = |
24 rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir) | 23 rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir) |
25 native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)" | 24 native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)" |
26 | 25 |
27 if (!is_debug) { | 26 if (!is_debug) { |
28 proguard_enabled = true | 27 proguard_enabled = true |
29 proguard_configs = [ "//chrome/android/java/proguard.flags" ] | 28 _prev_proguard_configs = [] |
| 29 if (defined(proguard_configs)) { |
| 30 _prev_proguard_configs = proguard_configs |
| 31 } |
| 32 proguard_configs = [] |
| 33 proguard_configs = |
| 34 [ "//chrome/android/java/proguard.flags" ] + _prev_proguard_configs |
30 } | 35 } |
31 | 36 |
32 if (chromium_linker_supported) { | 37 if (chromium_linker_supported) { |
33 use_chromium_linker = chrome_public_apk_use_chromium_linker | 38 use_chromium_linker = chrome_public_apk_use_chromium_linker |
34 | 39 |
35 # TODO: Enable packed relocations for x64. See: b/20532404 | 40 # TODO: Enable packed relocations for x64. See: b/20532404 |
36 if (current_cpu != "x64") { | 41 if (current_cpu != "x64") { |
37 enable_relocation_packing = chrome_public_apk_use_relocation_packer | 42 enable_relocation_packing = chrome_public_apk_use_relocation_packer |
38 } | 43 } |
39 } | 44 } |
40 } | 45 } |
41 } | 46 } |
OLD | NEW |