def METHOD_NAME(log1, log2, repls, ignore_includes):
    ###############################################################################
    """
    Search for build/link commands and compare them
    """
    are_same = True
    # Read files
    log1_contents = read_maybe_gzip(log1)
    log2_contents = read_maybe_gzip(log2)
    # Normalize log2
    for replace_item, replace_with in repls.items():
        log2_contents = log2_contents.replace(replace_item, replace_with)
    # Transform log contents to a map of filename -> compile_args
    compile_dict1 = parse_log(log1_contents)
    compile_dict2 = parse_log(log2_contents)
    file_set1 = set(compile_dict1.keys())
    file_set2 = set(compile_dict2.keys())
    for item in file_set1 - file_set2:
        print("{} is missing compilation of {}".format(log2, item))
        are_same = False
    for item in file_set2 - file_set1:
        print("{} has unexpected compilation of {}".format(log2, item))
        are_same = False
    for item in file_set1 & file_set2:
        print("Checking compilation of {}".format(item))
        flags1 = compile_dict1[item]
        flags2 = compile_dict2[item]
        missing = set(flags1) - set(flags2)
        extra = set(flags2) - set(flags1)
        # Let's not worry about order yet even though some flags are order-sensitive
        for flag in missing:
            if not (ignore_includes and flag.startswith("-I")) and item not in flag:
                print("  Missing flag {}".format(flag))
                are_same = False
        for flag in extra:
            if (
                flag != "-o"
                and not flag.startswith("CMakeFiles")
                and not (ignore_includes and flag.startswith("-I"))
                and item not in flag
            ):
                print("  Extra flag {}".format(flag))
                are_same = False
    return are_same