Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from compiler.ast import Const | 5 from compiler.ast import Const |
| 6 from compiler.ast import Dict | 6 from compiler.ast import Dict |
| 7 from compiler.ast import Discard | 7 from compiler.ast import Discard |
| 8 from compiler.ast import List | 8 from compiler.ast import List |
| 9 from compiler.ast import Module | 9 from compiler.ast import Module |
| 10 from compiler.ast import Node | 10 from compiler.ast import Node |
| (...skipping 2547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2558 # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps | 2558 # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps |
| 2559 # track of the keys corresponding to "target" files. | 2559 # track of the keys corresponding to "target" files. |
| 2560 data = {'target_build_files': set()} | 2560 data = {'target_build_files': set()} |
| 2561 aux_data = {} | 2561 aux_data = {} |
| 2562 for build_file in build_files: | 2562 for build_file in build_files: |
| 2563 # Normalize paths everywhere. This is important because paths will be | 2563 # Normalize paths everywhere. This is important because paths will be |
| 2564 # used as keys to the data dict and for references between input files. | 2564 # used as keys to the data dict and for references between input files. |
| 2565 build_file = os.path.normpath(build_file) | 2565 build_file = os.path.normpath(build_file) |
| 2566 try: | 2566 try: |
| 2567 if parallel: | 2567 if parallel: |
| 2568 print >>sys.stderr, 'Using parallel processing.' | |
|
Nico
2013/07/08 22:12:51
Mention that you're removing this in the CL descri
| |
| 2569 LoadTargetBuildFileParallel(build_file, data, aux_data, | 2568 LoadTargetBuildFileParallel(build_file, data, aux_data, |
| 2570 variables, includes, depth, check) | 2569 variables, includes, depth, check) |
| 2571 else: | 2570 else: |
| 2572 LoadTargetBuildFile(build_file, data, aux_data, | 2571 LoadTargetBuildFile(build_file, data, aux_data, |
| 2573 variables, includes, depth, check, True) | 2572 variables, includes, depth, check, True) |
| 2574 except Exception, e: | 2573 except Exception, e: |
| 2575 gyp.common.ExceptionAppend(e, 'while trying to load %s' % build_file) | 2574 gyp.common.ExceptionAppend(e, 'while trying to load %s' % build_file) |
| 2576 raise | 2575 raise |
| 2577 | 2576 |
| 2578 # Build a dict to access each target's subdict by qualified name. | 2577 # Build a dict to access each target's subdict by qualified name. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2675 ValidateRunAsInTarget(target, target_dict, build_file) | 2674 ValidateRunAsInTarget(target, target_dict, build_file) |
| 2676 ValidateActionsInTarget(target, target_dict, build_file) | 2675 ValidateActionsInTarget(target, target_dict, build_file) |
| 2677 | 2676 |
| 2678 # Generators might not expect ints. Turn them into strs. | 2677 # Generators might not expect ints. Turn them into strs. |
| 2679 TurnIntIntoStrInDict(data) | 2678 TurnIntIntoStrInDict(data) |
| 2680 | 2679 |
| 2681 # TODO(mark): Return |data| for now because the generator needs a list of | 2680 # TODO(mark): Return |data| for now because the generator needs a list of |
| 2682 # build files that came in. In the future, maybe it should just accept | 2681 # build files that came in. In the future, maybe it should just accept |
| 2683 # a list, and not the whole data dict. | 2682 # a list, and not the whole data dict. |
| 2684 return [flat_list, targets, data] | 2683 return [flat_list, targets, data] |
| OLD | NEW |