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

Unified Diff: build/android/gyp/pack_arm_relocations.py

Issue 396283002: Restrict relocation packing to Release build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update for review feedback Created 6 years, 5 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
« no previous file with comments | « no previous file | build/android/pack_arm_relocations.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/pack_arm_relocations.py
diff --git a/build/android/gyp/pack_arm_relocations.py b/build/android/gyp/pack_arm_relocations.py
index f117ad7b80805bd619e5d5d5f55cd9e44266e13d..54d63d7a0b0b86c8f4a48225e67c6c367db43ee2 100755
--- a/build/android/gyp/pack_arm_relocations.py
+++ b/build/android/gyp/pack_arm_relocations.py
@@ -6,10 +6,11 @@
"""Pack ARM relative relocations in a library (or copy unchanged).
-If --enable-packing, invoke the relocation_packer tool to pack the .rel.dyn
-section in the given library files. This step is inserted after the libraries
-are stripped. Packing adds a new .android.rel.dyn section to the file and
-reduces the size of .rel.dyn accordingly.
+If --enable-packing and --configuration-name=='Release', invoke the
+relocation_packer tool to pack the .rel.dyn section in the given library
+files. This step is inserted after the libraries are stripped. Packing
+adds a new .android.rel.dyn section to the file and reduces the size of
+.rel.dyn accordingly.
Currently packing only understands ARM32 shared libraries. For all other
architectures --enable-packing should be set to zero. In this case the
@@ -61,9 +62,13 @@ def CopyArmLibraryUnchanged(library_path, output_path):
def main():
parser = optparse.OptionParser()
+ parser.add_option('--configuration-name',
+ default='Release',
+ help='Gyp configuration name (i.e. Debug, Release)')
parser.add_option('--enable-packing',
choices=['0', '1'],
- help='Pack relocations if 1, otherwise plain file copy')
+ help=('Pack relocations if 1 and configuration name is \'Release\','
+ ' otherwise plain file copy'))
parser.add_option('--exclude-packing-list',
default='',
help='Names of any libraries explicitly not packed')
@@ -80,7 +85,8 @@ def main():
parser.add_option('--stamp', help='Path to touch on success')
options, _ = parser.parse_args()
- enable_packing = options.enable_packing == '1'
+ enable_packing = (options.enable_packing == '1' and
+ options.configuration_name == 'Release')
exclude_packing_set = set(shlex.split(options.exclude_packing_list))
with open(options.libraries_file, 'r') as libfile:
« no previous file with comments | « no previous file | build/android/pack_arm_relocations.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698