How to use the ninja.ninja.Parser function in ninja

To help you get started, we’ve selected a few ninja examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aosp-mirror / platform_development / vndk / tools / sourcedr / sourcedr / map.py View on Github external
def load_build_dep_ninja(ninja_path, work_dir, ninja_deps=None):
    manifest = ninja.Parser().parse(ninja_path, 'utf-8', ninja_deps)
    graph = collections.defaultdict(set)
    for build in manifest.builds:
        for path in itertools.chain(build.explicit_outs, build.implicit_outs):
            ins = graph[path]
            ins.update(build.explicit_ins)
            ins.update(build.implicit_ins)
            ins.update(build.depfile_implicit_ins)
    return load_build_dep_graph(graph)

ninja

Ninja is a small build system with a focus on speed

Apache-2.0
Latest version published 1 year ago

Package Health Score

83 / 100
Full package analysis