Index: build/android/incremental_install/create_install_script.py |
diff --git a/build/android/incremental_install/create_install_script.py b/build/android/incremental_install/create_install_script.py |
index ff8e2c1a1a2659a3de7cb82119e17deb29272524..3de4ed67945f0796aeaa0ad50a6b6cae0c58fd39 100755 |
--- a/build/android/incremental_install/create_install_script.py |
+++ b/build/android/incremental_install/create_install_script.py |
@@ -37,14 +37,14 @@ def _ResolvePath(path): |
# Exported to allow test runner to be able to install incremental apks. |
def GetInstallParameters(): |
apk_path = {apk_path} |
- lib_dir = {lib_dir} |
+ native_libs = {native_libs} |
dex_files = {dex_files} |
splits = {splits} |
show_proguard_warning = {show_proguard_warning} |
return dict(apk_path=_ResolvePath(apk_path), |
dex_files=[_ResolvePath(p) for p in dex_files], |
- lib_dir=_ResolvePath(lib_dir), |
+ native_libs=[_ResolvePath(p) for p in native_libs], |
show_proguard_warning=show_proguard_warning, |
splits=[_ResolvePath(p) for p in splits]) |
@@ -57,8 +57,8 @@ def main(): |
_ResolvePath(cmd_path), |
'--output-directory', _ResolvePath(output_directory), |
] |
- if params['lib_dir']: |
- cmd_args.extend(('--lib-dir', params['lib_dir'])) |
+ for native_lib in params['native_libs']: |
+ cmd_args.extend(('--native_lib', native_lib)) |
for dex_path in params['dex_files']: |
cmd_args.extend(('--dex-file', dex_path)) |
for split in params['splits']: |
@@ -92,8 +92,11 @@ def _ParseArgs(args): |
default=[], |
help='A glob matching the apk splits. ' |
'Can be specified multiple times.') |
- parser.add_argument('--lib-dir', |
- help='Path to native libraries directory.') |
+ parser.add_argument('--native-libs', |
+ action='append', |
+ default=[], |
+ help='GYP-list of paths to native libraries. Can be ' |
+ 'repeated.') |
parser.add_argument('--dex-file', |
action='append', |
default=[], |
@@ -108,6 +111,10 @@ def _ParseArgs(args): |
options = parser.parse_args(args) |
options.dex_files += build_utils.ParseGypList(options.dex_file_list) |
+ all_libs = [] |
+ for gyp_list in options.native_libs: |
+ all_libs.extend(build_utils.ParseGypList(gyp_list)) |
+ options.native_libs = all_libs |
return options |
@@ -125,7 +132,7 @@ def main(args): |
'cmd_path': pformat(relativize(installer_path)), |
'apk_path': pformat(relativize(options.apk_path)), |
'output_directory': pformat(relativize(options.output_directory)), |
- 'lib_dir': pformat(relativize(options.lib_dir)), |
+ 'native_libs': pformat([relativize(p) for p in options.native_libs]), |
'dex_files': pformat([relativize(p) for p in options.dex_files]), |
'show_proguard_warning': pformat(options.show_proguard_warning), |
'splits': pformat([relativize(p) for p in options.splits]), |