Chromium Code Reviews| Index: build/config/android/rules.gni |
| diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
| index 2bb432d4dc888710365a8c4254d65fb5facd5e52..c71ec56adbb939090a91aaafa6e7459d91ab16db 100644 |
| --- a/build/config/android/rules.gni |
| +++ b/build/config/android/rules.gni |
| @@ -8,7 +8,6 @@ import("//tools/grit/grit_rule.gni") |
| assert(is_android) |
| - |
| # Declare a jni target |
| # |
| # This target generates the native jni bindings for a set of .java files. |
| @@ -986,19 +985,53 @@ template("android_apk") { |
| } |
| if (_native_libs != []) { |
| - copy_ex("${_template_name}__prepare_native") { |
| - clear_dir = true |
| + action("${_template_name}__prepare_native") { |
| + script = "//build/android/gyp/pack_arm_relocations.py" |
| + packed_libraries_dir = "$_native_libs_dir/$android_app_abi" |
| + depfile = "$target_gen_dir/$target_name.d" |
| + outputs = [ |
| + depfile |
| + ] |
| inputs = [ |
| build_config |
| ] |
| - dest = "$_native_libs_dir/$android_app_abi" |
| + relocation_packer_target = "//tools/relocation_packer($host_toolchain)" |
| + deps = [ |
| + relocation_packer_target |
| + ] |
| + skip_packing_list = [ |
| + "gdbserver", |
| + "libchromium_android_linker.so", |
| + ] |
| + |
| + has_relocations_with_addends = 0 |
|
simonb (inactive)
2014/10/17 12:30:20
Should be 0 for arm, 1 for arm64.
cjhopman
2014/10/17 20:55:19
Done. This is in //tools/relocation_packer/config.
|
| + relocation_packer_dir = get_label_info( |
| + "$relocation_packer_target", "root_out_dir") |
| + relocation_packer_exe = "${relocation_packer_dir}/relocation_packer" |
| + enable_packing = false |
|
simonb (inactive)
2014/10/17 12:30:20
Always false? (How is packing turned on? It is n
cjhopman
2014/10/17 20:55:19
Done.
|
| + enable_packing_arg = 0 |
| + if (enable_packing) { |
| + enable_packing_arg = 1 |
| + } |
| + |
| args = [ |
| - "--files=@FileArg(${_rebased_build_config}:native:libraries)", |
| + "--depfile", rebase_path(depfile, root_build_dir), |
| + "--enable-packing=$enable_packing_arg", |
| + "--has-relocations-with-addends=$has_relocations_with_addends", |
| + "--exclude-packing-list=$skip_packing_list", |
| + "--android-pack-relocations", rebase_path(relocation_packer_exe, root_build_dir), |
| + "--android-objcopy", rebase_path(android_objcopy, root_build_dir), |
| + "--stripped-libraries-dir", rebase_path(root_build_dir, root_build_dir), |
| + "--packed-libraries-dir", rebase_path(packed_libraries_dir, root_build_dir), |
| + "--libraries=@FileArg(${_rebased_build_config}:native:libraries)", |
| + "--clear-dir" |
| ] |
| + |
| if (is_debug) { |
| - rebased_gdbserver = rebase_path(android_gdbserver, root_build_dir) |
| + rebased_gdbserver = rebase_path([ android_gdbserver ], root_build_dir) |
|
simonb (inactive)
2014/10/17 12:30:20
This seems unconnected with relocation packing wor
cjhopman
2014/10/17 20:55:19
We want gdbserver in the native libraries director
|
| + inputs += [ android_gdbserver ] |
| args += [ |
| - "--files=[\"$rebased_gdbserver\"]" |
| + "--libraries=$rebased_gdbserver" |
| ] |
| } |
| } |