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

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

Issue 456493002: Add native libraries to gn apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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 | « build/android/gyp/copy_ex.py ('k') | build/android/gyp/create_native_libraries_header.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/create_device_library_links.py
diff --git a/build/android/gyp/create_device_library_links.py b/build/android/gyp/create_device_library_links.py
index d5828f4c3bd4ae375835f3fca81f93e4940c5da7..30e050c00fcbe89518d9fb86ed1f8628ec9efbda 100755
--- a/build/android/gyp/create_device_library_links.py
+++ b/build/android/gyp/create_device_library_links.py
@@ -34,7 +34,7 @@ def RunShellCommand(device, cmd):
def CreateSymlinkScript(options):
- libraries = build_utils.ReadJson(options.libraries_json)
+ libraries = build_utils.ParseGypList(options.libraries)
link_cmd = (
'rm $APK_LIBRARIES_DIR/%(lib_basename)s > /dev/null 2>&1 \n'
@@ -78,15 +78,16 @@ def TriggerSymlinkScript(options):
RunShellCommand(device, trigger_cmd)
-def main():
+def main(args):
+ args = build_utils.ExpandFileArgs(args)
parser = optparse.OptionParser()
parser.add_option('--apk', help='Path to the apk.')
parser.add_option('--script-host-path',
help='Path on the host for the symlink script.')
parser.add_option('--script-device-path',
help='Path on the device to push the created symlink script.')
- parser.add_option('--libraries-json',
- help='Path to the json list of native libraries.')
+ parser.add_option('--libraries',
+ help='List of native libraries.')
parser.add_option('--target-dir',
help='Device directory that contains the target libraries for symlinks.')
parser.add_option('--stamp', help='Path to touch on success.')
@@ -94,9 +95,9 @@ def main():
help='Path to build device configuration.')
parser.add_option('--configuration-name',
help='The build CONFIGURATION_NAME')
- options, _ = parser.parse_args()
+ options, _ = parser.parse_args(args)
- required_options = ['apk', 'libraries_json', 'script_host_path',
+ required_options = ['apk', 'libraries', 'script_host_path',
'script_device_path', 'target_dir', 'configuration_name']
build_utils.CheckOptions(options, parser, required=required_options)
constants.SetBuildType(options.configuration_name)
@@ -109,4 +110,4 @@ def main():
if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(main(sys.argv[1:]))
« no previous file with comments | « build/android/gyp/copy_ex.py ('k') | build/android/gyp/create_native_libraries_header.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698