(
build_files,
variables,
includes,
depth,
generator_input_info,
check,
circular_check,
parallel,
root_targets,
)
| 2932 | |
| 2933 | |
| 2934 | def Load( |
| 2935 | build_files, |
| 2936 | variables, |
| 2937 | includes, |
| 2938 | depth, |
| 2939 | generator_input_info, |
| 2940 | check, |
| 2941 | circular_check, |
| 2942 | parallel, |
| 2943 | root_targets, |
| 2944 | ): |
| 2945 | SetGeneratorGlobals(generator_input_info) |
| 2946 | # A generator can have other lists (in addition to sources) be processed |
| 2947 | # for rules. |
| 2948 | extra_sources_for_rules = generator_input_info["extra_sources_for_rules"] |
| 2949 | |
| 2950 | # Load build files. This loads every target-containing build file into |
| 2951 | # the |data| dictionary such that the keys to |data| are build file names, |
| 2952 | # and the values are the entire build file contents after "early" or "pre" |
| 2953 | # processing has been done and includes have been resolved. |
| 2954 | # NOTE: data contains both "target" files (.gyp) and "includes" (.gypi), as |
| 2955 | # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps |
| 2956 | # track of the keys corresponding to "target" files. |
| 2957 | data = {"target_build_files": set()} |
| 2958 | # Normalize paths everywhere. This is important because paths will be |
| 2959 | # used as keys to the data dict and for references between input files. |
| 2960 | build_files = set(map(os.path.normpath, build_files)) |
| 2961 | if parallel: |
| 2962 | LoadTargetBuildFilesParallel( |
| 2963 | build_files, data, variables, includes, depth, check, generator_input_info |
| 2964 | ) |
| 2965 | else: |
| 2966 | aux_data = {} |
| 2967 | for build_file in build_files: |
| 2968 | try: |
| 2969 | LoadTargetBuildFile( |
| 2970 | build_file, data, aux_data, variables, includes, depth, check, True |
| 2971 | ) |
| 2972 | except Exception as e: |
| 2973 | gyp.common.ExceptionAppend(e, "while trying to load %s" % build_file) |
| 2974 | raise |
| 2975 | |
| 2976 | # Build a dict to access each target's subdict by qualified name. |
| 2977 | targets = BuildTargetsDict(data) |
| 2978 | |
| 2979 | # Fully qualify all dependency links. |
| 2980 | QualifyDependencies(targets) |
| 2981 | |
| 2982 | # Remove self-dependencies from targets that have 'prune_self_dependencies' |
| 2983 | # set to 1. |
| 2984 | RemoveSelfDependencies(targets) |
| 2985 | |
| 2986 | # Expand dependencies specified as build_file:*. |
| 2987 | ExpandWildcardDependencies(targets, data) |
| 2988 | |
| 2989 | # Remove all dependencies marked as 'link_dependency' from the targets of |
| 2990 | # type 'none'. |
| 2991 | RemoveLinkDependenciesFromNoneTargets(targets) |
nothing calls this directly
no test coverage detected
searching dependent graphs…