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

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

Issue 2629663003: Reland of Android: Delete rezip in favor of zipalign -p (Closed)
Patch Set: no gdbserver Created 3 years, 11 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 | « android_webview/tools/apk_merger.py ('k') | build/android/gyp/finalize_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/apkbuilder.py
diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py
index 82ac496ed970039ed34bd51af0e06c64b88d91f4..162477c186dfeb342dbf0289d03693fc0fbd0345 100755
--- a/build/android/gyp/apkbuilder.py
+++ b/build/android/gyp/apkbuilder.py
@@ -161,14 +161,20 @@ def _CreateAssetsList(path_tuples):
def _AddNativeLibraries(out_apk, native_libs, android_abi, uncompress):
"""Add native libraries to APK."""
+ has_crazy_linker = any('android_linker' in os.path.basename(p)
+ for p in native_libs)
for path in native_libs:
basename = os.path.basename(path)
- apk_path = 'lib/%s/%s' % (android_abi, basename)
compress = None
- if (uncompress and os.path.splitext(basename)[1] == '.so'):
+ if (uncompress and os.path.splitext(basename)[1] == '.so'
+ and 'android_linker' not in basename):
compress = False
+ # Add prefix to prevent android install from extracting upon install.
+ if has_crazy_linker:
+ basename = 'crazy.' + basename
+ apk_path = 'lib/%s/%s' % (android_abi, basename)
build_utils.AddToZipHermetic(out_apk,
apk_path,
src_path=path,
@@ -265,8 +271,9 @@ def main(args):
options.uncompress_shared_libraries)
for name in sorted(options.native_lib_placeholders):
- # Empty libs files are ignored by md5check, but rezip requires them
- # to be empty in order to identify them as placeholders.
+ # Note: Empty libs files are ignored by md5check (can cause issues
+ # with stale builds when the only change is adding/removing
+ # placeholders).
apk_path = 'lib/%s/%s' % (options.android_abi, name)
build_utils.AddToZipHermetic(out_apk, apk_path, data='')
« no previous file with comments | « android_webview/tools/apk_merger.py ('k') | build/android/gyp/finalize_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698