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

Side by Side Diff: build/android/gyp/create_device_library_links.py

Issue 1647353002: Use gn_helpers to [se]serialize GN lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@python_impl
Patch Set: more Created 4 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 unified diff | Download patch
« no previous file with comments | « build/android/gyp/copy_ex.py ('k') | build/android/gyp/create_dist_jar.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Creates symlinks to native libraries for an APK. 7 """Creates symlinks to native libraries for an APK.
8 8
9 The native libraries should have previously been pushed to the device (in 9 The native libraries should have previously been pushed to the device (in
10 options.target_dir). This script then creates links in an apk's lib/ folder to 10 options.target_dir). This script then creates links in an apk's lib/ folder to
(...skipping 18 matching lines...) Expand all
29 def RunShellCommand(device, cmd): 29 def RunShellCommand(device, cmd):
30 output = device.RunShellCommand(cmd, check_return=True) 30 output = device.RunShellCommand(cmd, check_return=True)
31 31
32 if output: 32 if output:
33 raise Exception( 33 raise Exception(
34 'Unexpected output running command: ' + cmd + '\n' + 34 'Unexpected output running command: ' + cmd + '\n' +
35 '\n'.join(output)) 35 '\n'.join(output))
36 36
37 37
38 def CreateSymlinkScript(options): 38 def CreateSymlinkScript(options):
39 libraries = build_utils.ParseGypList(options.libraries) 39 libraries = build_utils.ParseGnList(options.libraries)
40 40
41 link_cmd = ( 41 link_cmd = (
42 'rm $APK_LIBRARIES_DIR/%(lib_basename)s > /dev/null 2>&1 \n' 42 'rm $APK_LIBRARIES_DIR/%(lib_basename)s > /dev/null 2>&1 \n'
43 'ln -s $STRIPPED_LIBRARIES_DIR/%(lib_basename)s ' 43 'ln -s $STRIPPED_LIBRARIES_DIR/%(lib_basename)s '
44 '$APK_LIBRARIES_DIR/%(lib_basename)s \n' 44 '$APK_LIBRARIES_DIR/%(lib_basename)s \n'
45 ) 45 )
46 46
47 script = '#!/bin/sh \n' 47 script = '#!/bin/sh \n'
48 48
49 for lib in libraries: 49 for lib in libraries:
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 CreateSymlinkScript(options) 113 CreateSymlinkScript(options)
114 TriggerSymlinkScript(options) 114 TriggerSymlinkScript(options)
115 115
116 if options.stamp: 116 if options.stamp:
117 build_utils.Touch(options.stamp) 117 build_utils.Touch(options.stamp)
118 118
119 119
120 if __name__ == '__main__': 120 if __name__ == '__main__':
121 sys.exit(main(sys.argv[1:])) 121 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « build/android/gyp/copy_ex.py ('k') | build/android/gyp/create_dist_jar.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698