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

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

Issue 621263003: Move version branding to before relocation packing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | build/android/insert_chromium_version.gypi » ('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 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 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 """Insert a version string into a library as a section '.chromium.version'. 7 """Insert a version string into a library as a section '.chromium.version'.
8 """ 8 """
9 9
10 import optparse 10 import optparse
(...skipping 20 matching lines...) Expand all
31 '--add-section', '.chromium.version=%s' % stream.name, 31 '--add-section', '.chromium.version=%s' % stream.name,
32 library_path] 32 library_path]
33 build_utils.CheckOutput(objcopy_command) 33 build_utils.CheckOutput(objcopy_command)
34 34
35 def main(args): 35 def main(args):
36 args = build_utils.ExpandFileArgs(args) 36 args = build_utils.ExpandFileArgs(args)
37 parser = optparse.OptionParser() 37 parser = optparse.OptionParser()
38 38
39 parser.add_option('--android-objcopy', 39 parser.add_option('--android-objcopy',
40 help='Path to the toolchain\'s objcopy binary') 40 help='Path to the toolchain\'s objcopy binary')
41 parser.add_option('--libraries-source-dir', 41 parser.add_option('--stripped-libraries-dir',
42 help='Directory of native libraries') 42 help='Directory of native libraries')
43 parser.add_option('--libraries', 43 parser.add_option('--libraries',
44 help='List of libraries') 44 help='List of libraries')
45 parser.add_option('--version-string', 45 parser.add_option('--version-string',
46 help='Version string to be inserted') 46 help='Version string to be inserted')
47 parser.add_option('--stamp', help='Path to touch on success') 47 parser.add_option('--stamp', help='Path to touch on success')
48 48
49 options, _ = parser.parse_args(args) 49 options, _ = parser.parse_args(args)
50 libraries = build_utils.ParseGypList(options.libraries) 50 libraries = build_utils.ParseGypList(options.libraries)
51 51
52 for library in libraries: 52 for library in libraries:
53 library_path = os.path.join(options.libraries_source_dir, library) 53 library_path = os.path.join(options.stripped_libraries_dir, library)
54 54
55 InsertChromiumVersion(options.android_objcopy, 55 InsertChromiumVersion(options.android_objcopy,
56 library_path, 56 library_path,
57 options.version_string) 57 options.version_string)
58 58
59 if options.stamp: 59 if options.stamp:
60 build_utils.Touch(options.stamp) 60 build_utils.Touch(options.stamp)
61 61
62 return 0 62 return 0
63 63
64 64
65 if __name__ == '__main__': 65 if __name__ == '__main__':
66 sys.exit(main(sys.argv[1:])) 66 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | build/android/insert_chromium_version.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698