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

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

Issue 2326973003: Reland of Make secondary abi work for component build (Closed)
Patch Set: guard import behind enable_java_templates Created 4 years, 3 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/gyp/write_build_config.py
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py
index 1843c7481b0086503f351fba3d1f58142a2fbb17..d121f7d8e01b556f924ca02fc04da7a199edb3f0 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -209,6 +209,11 @@ def _ExtractSharedLibsFromRuntimeDeps(runtime_deps_files):
ret.reverse()
return ret
+def _CreateJavaLibrariesList(library_paths):
+ """ Create a java literal array with the "base" library names:
+ e.g. libfoo.so -> foo
+ """
+ return ('{%s}' % ','.join(['"%s"' % s[3:-3] for s in library_paths]))
def main(argv):
parser = optparse.OptionParser()
@@ -264,6 +269,9 @@ def main(argv):
parser.add_option('--shared-libraries-runtime-deps',
help='Path to file containing runtime deps for shared '
'libraries.')
+ parser.add_option('--secondary-abi-shared-libraries-runtime-deps',
+ help='Path to file containing runtime deps for secondary '
+ 'abi shared libraries.')
# apk options
parser.add_option('--apk-path', help='Path to the target\'s apk output.')
@@ -629,15 +637,24 @@ def main(argv):
options.shared_libraries_runtime_deps or '[]')
if runtime_deps_files:
library_paths = _ExtractSharedLibsFromRuntimeDeps(runtime_deps_files)
- # Create a java literal array with the "base" library names:
- # e.g. libfoo.so -> foo
- java_libraries_list = ('{%s}' % ','.join(
- ['"%s"' % s[3:-3] for s in library_paths]))
+ java_libraries_list = _CreateJavaLibrariesList(library_paths)
+
+ secondary_abi_library_paths = []
+ secondary_abi_java_libraries_list = None
+ secondary_abi_runtime_deps_files = build_utils.ParseGnList(
+ options.secondary_abi_shared_libraries_runtime_deps or '[]')
+ if secondary_abi_runtime_deps_files:
+ secondary_abi_library_paths = _ExtractSharedLibsFromRuntimeDeps(
+ secondary_abi_runtime_deps_files)
+ secondary_abi_java_libraries_list = _CreateJavaLibrariesList(
+ secondary_abi_library_paths)
all_inputs.extend(runtime_deps_files)
config['native'] = {
'libraries': library_paths,
+ 'secondary_abi_libraries': secondary_abi_library_paths,
'java_libraries_list': java_libraries_list,
+ 'secondary_abi_java_libraries_list': secondary_abi_java_libraries_list,
}
config['assets'], config['uncompressed_assets'] = (
_MergeAssets(deps.All('android_assets')))

Powered by Google App Engine
This is Rietveld 408576698