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

Side by Side Diff: build/jumbo.py

Issue 2822243002: Fixup jumbo.gni (-Wno-subobject-linkage)
Patch Set: Fixup base scripts for mac (Objective C) Created 3 years, 8 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/jumbo.gni ('k') | no next file » | 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 2016 The Chromium Authors. All rights reserved. 3 # Copyright 2016 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 """This script creates a "jumbo" file which merges all incoming files 7 """This script creates a "jumbo" file which merges all incoming files
8 for compiling. 8 for compiling.
9 9
10 """ 10 """
(...skipping 26 matching lines...) Expand all
37 written_inputs = 0 37 written_inputs = 0
38 for output_index, output_file in enumerate(args.outputs): 38 for output_index, output_file in enumerate(args.outputs):
39 # TODO: Check if the file is right already and then do not update it. 39 # TODO: Check if the file is right already and then do not update it.
40 with open(output_file, "w") as out: 40 with open(output_file, "w") as out:
41 out.write("/* This is a Jumbo file. Don't edit. */\n\n") 41 out.write("/* This is a Jumbo file. Don't edit. */\n\n")
42 out.write("/* Generated with jumbo.py. */\n\n") 42 out.write("/* Generated with jumbo.py. */\n\n")
43 input_limit = (output_index + 1) * input_count / output_count 43 input_limit = (output_index + 1) * input_count / output_count
44 while written_inputs < input_limit: 44 while written_inputs < input_limit:
45 filename = inputs[written_inputs] 45 filename = inputs[written_inputs]
46 written_inputs += 1 46 written_inputs += 1
47 if filename.endswith(".h"): 47 if filename.endswith(".h") or filename.endswith(".mm"):
48 continue 48 continue
49 49
50 out.write("#include \"%s\"\n" % filename) 50 out.write("#include \"%s\"\n" % filename)
51 51
52 if args.verbose: 52 if args.verbose:
53 print("Generated %s (%d files) based on %s" % (str(args.outputs), 53 print("Generated %s (%d files) based on %s" % (str(args.outputs),
54 written_inputs, 54 written_inputs,
55 args.file_list)) 55 args.file_list))
56 56
57 if __name__ == "__main__": 57 if __name__ == "__main__":
58 main() 58 main()
OLDNEW
« no previous file with comments | « build/jumbo.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698