Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1817)

Unified Diff: build/android/pack_arm_relocations.gypi

Issue 358863002: Add gyp machinery to build with packed ARM relative relocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pack_arm_relocations.gypi
diff --git a/build/android/strip_native_libraries.gypi b/build/android/pack_arm_relocations.gypi
similarity index 50%
copy from build/android/strip_native_libraries.gypi
copy to build/android/pack_arm_relocations.gypi
index 57de0afd4f4a2d0bb5655e0f2205e1347dd24ae3..2bb76d5727f1456e15a9c61af8f62aa0e90f1ef4 100644
--- a/build/android/strip_native_libraries.gypi
+++ b/build/android/pack_arm_relocations.gypi
@@ -1,33 +1,34 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
+# Copyright 2014 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.
-# This file is meant to be included into an action to provide a rule that strips
-# native libraries.
+# This file is meant to be included into an action to provide a rule that
+# packs ARM relative relocations in native libraries.
#
# To use this, create a gyp target with the following form:
# {
-# 'action_name': 'strip_native_libraries',
+# 'action_name': 'pack_arm_relocations',
# 'actions': [
# 'variables': {
+# 'enable_packing': 'pack relocations if true, otherwise plain file copy'
# 'ordered_libraries_file': 'file generated by write_ordered_libraries'
# 'input_paths': 'files to be added to the list of inputs'
# 'stamp': 'file to touch when the action is complete'
-# 'stripped_libraries_dir': 'directory to store stripped libraries',
-# },
-# 'includes': [ '../../build/android/strip_native_libraries.gypi' ],
+# 'stripped_libraries_dir': 'directory holding stripped libraries',
+# 'packed_libraries_dir': 'directory holding packed libraries',
+# 'includes': [ '../../build/android/pack_arm_relocations.gypi' ],
# ],
# },
#
{
- 'message': 'Stripping libraries for <(_target_name)',
'variables': {
'input_paths': [],
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/strip_library_for_device.py',
+ '<(DEPTH)/build/android/gyp/pack_arm_relocations.py',
+ '<(PRODUCT_DIR)/relocation_packer',
'<(ordered_libraries_file)',
'>@(input_paths)',
],
@@ -35,6 +36,14 @@
'<(stamp)',
],
'conditions': [
+ ['enable_packing == 1', {
+ 'message': 'Packing ARM relative relocations for <(_target_name)',
+ 'dependencies': [
+ '<(DEPTH)/tools/relocation_packer/relocation_packer.gyp:relocation_packer#host',
+ ],
+ }, {
+ 'message': 'Copying libraries (no packing) for <(_target_name)',
rmcilroy 2014/06/27 11:14:54 nit - (no relocation packing)
simonb (inactive) 2014/06/30 16:23:23 Done.
simonb (inactive) 2014/06/30 16:23:23 Done.
+ }],
['component == "shared_library"', {
# Add a fake output to force the build to always re-run this step. This
# is required because the real inputs are not known at gyp-time and
@@ -43,11 +52,12 @@
}],
],
'action': [
- 'python', '<(DEPTH)/build/android/gyp/strip_library_for_device.py',
- '--android-strip=<(android_strip)',
- '--android-strip-arg=--strip-unneeded',
+ 'python', '<(DEPTH)/build/android/gyp/pack_arm_relocations.py',
+ '--enable-packing=<(enable_packing)',
+ '--android-pack-relocations=<(PRODUCT_DIR)/relocation_packer',
+ '--android-objcopy=<(android_objcopy)',
'--stripped-libraries-dir=<(stripped_libraries_dir)',
- '--libraries-dir=<(SHARED_LIB_DIR)',
+ '--packed-libraries-dir=<(packed_libraries_dir)',
'--libraries-file=<(ordered_libraries_file)',
'--stamp=<(stamp)',
],

Powered by Google App Engine
This is Rietveld 408576698