def recurse(subpath): # Load the LLVMBuild file. llvmbuild_path = os.path.join(llvmbuild_source_root + subpath, 'LLVMBuild.txt') if not os.path.exists(llvmbuild_path): fatal("missing LLVMBuild.txt file at: %r" % (llvmbuild_path,)) # Parse the components from it. common,info_iter = componentinfo.load_from_path(llvmbuild_path, subpath) for info in info_iter: yield info # Recurse into the specified subdirectories. for subdir in common.get_list("subdirectories"): for item in recurse(os.path.join(subpath, subdir)): yield item
def recurse(subpath): # Load the LLVMBuild file. llvmbuild_path = os.path.join(llvmbuild_source_root + subpath, 'LLVMBuild.txt') if not os.path.exists(llvmbuild_path): fatal("missing LLVMBuild.txt file at: %r" % (llvmbuild_path, )) # Parse the components from it. common, info_iter = componentinfo.load_from_path( llvmbuild_path, subpath) for info in info_iter: yield info # Recurse into the specified subdirectories. for subdir in common.get_list("subdirectories"): for item in recurse(os.path.join(subpath, subdir)): yield item