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

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

Issue 1395013002: GN: Fix incremental install failing on some 64 bit devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/config/android/internal_rules.gni » ('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 2ab568ffb067a42a2edfe7bd243d5b6ec9f02a7c..1410d190540ffd51ed25b6b06cd7415fe76b9335 100755
--- a/build/android/gyp/apkbuilder.py
+++ b/build/android/gyp/apkbuilder.py
@@ -32,8 +32,12 @@ def _ParseArgs(args):
default=[])
parser.add_argument('--android-abi',
help='Android architecture to use for native libraries')
+ parser.add_argument('--create-placeholder-lib',
+ action='store_true',
+ help='Whether to add a dummy library file')
options = parser.parse_args(args)
- if options.native_libs_dir and not options.android_abi:
+ if not options.android_abi and (options.native_libs_dir or
+ options.create_placeholder_lib):
raise Exception('Must specify --android-abi with --native-libs-dir')
return options
@@ -68,6 +72,10 @@ def main(args):
for path in native_libs:
basename = os.path.basename(path)
apk.write(path, 'lib/%s/%s' % (options.android_abi, basename))
+ if options.create_placeholder_lib:
+ # Make it non-empty so that its checksum is non-zero and is not
+ # ignored by md5_check.
+ apk.writestr('lib/%s/libplaceholder.so' % options.android_abi, ':-)')
newt (away) 2015/10/09 00:00:10 Nice :-)
if options.dex_file:
apk.write(options.dex_file, 'classes.dex')
@@ -80,6 +88,7 @@ def main(args):
on_stale_md5,
options,
input_paths=input_paths,
+ input_strings=[options.create_placeholder_lib, options.android_abi],
output_paths=[options.output_apk])
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698