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

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

Issue 1473273002: GN(Android): Add libosmesa.so to ContentShell.apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 5 years, 1 month 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') | build/config/android/internal_rules.gni » ('J')
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 404d4dac9d564c2b8d3f3fa0c613acbe0a6216d3..648940de04de7b1157162c1123f6bdf7ae4b8428 100755
--- a/build/android/gyp/apkbuilder.py
+++ b/build/android/gyp/apkbuilder.py
@@ -45,10 +45,13 @@ def _ParseArgs(args):
required=True)
parser.add_argument('--dex-file',
help='Path to the classes.dex to use')
- # TODO(agrieve): Switch this to be a list of files rather than a directory.
+ # TODO(agrieve): Pass all libs via --native-libs and remove --native-libs-dir.
parser.add_argument('--native-libs-dir',
help='Directory containing native libraries to include',
default=[])
+ parser.add_argument('--native-libs',
+ help='List of native libraries to include',
+ default='[]')
parser.add_argument('--android-abi',
help='Android architecture to use for native libraries')
parser.add_argument('--native-lib-placeholders',
@@ -60,12 +63,14 @@ def _ParseArgs(args):
options.assets = build_utils.ParseGypList(options.assets)
options.uncompressed_assets = build_utils.ParseGypList(
options.uncompressed_assets)
+ options.native_libs = build_utils.ParseGypList(options.native_libs)
options.native_lib_placeholders = build_utils.ParseGypList(
options.native_lib_placeholders)
- if not options.android_abi and (options.native_libs_dir or
+ if not options.android_abi and (options.native_libs or
+ options.native_libs_dir or
options.native_lib_placeholders):
- raise Exception('Must specify --android-abi with --native-libs-dir')
+ raise Exception('Must specify --android-abi when native libs exist.')
return options
@@ -122,9 +127,9 @@ def main(args):
args = build_utils.ExpandFileArgs(args)
options = _ParseArgs(args)
- native_libs = []
+ native_libs = options.native_libs
if options.native_libs_dir:
- native_libs = _ListSubPaths(options.native_libs_dir)
+ native_libs += _ListSubPaths(options.native_libs_dir)
input_paths = [options.resource_apk, __file__] + native_libs
if options.dex_file:
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | build/config/android/internal_rules.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698