-static bool build_module_objs_with_coverage(struct manifest *m, bool keep,
- struct score *score,
- char **modobjs)
-{
- struct ccan_file *i;
-
- *modobjs = talloc_strdup(m, "");
- list_for_each(&m->c_files, i, list) {
- char *err;
- char *fullfile = talloc_asprintf(m, "%s/%s", m->dir, i->name);
-
- i->cov_compiled = maybe_temp_file(m, "", keep, fullfile);
- if (!compile_object(m, fullfile, ccan_dir, compiler, cflags,
- i->cov_compiled, &err)) {
- score_file_error(score, i, 0, "%s", err);
- talloc_free(i->cov_compiled);
- i->cov_compiled = NULL;
- return false;
- }
- *modobjs = talloc_asprintf_append(*modobjs,
- " %s", i->cov_compiled);
- }
- return true;
-}
-
-/* FIXME: Merge this into one place. */
-static char *obj_list(const struct manifest *m, const char *modobjs)
-{
- char *list = talloc_strdup(m, "");
- struct ccan_file *i;
- struct manifest *subm;
-
- /* Objects from any other C files. */
- list_for_each(&m->other_test_c_files, i, list)
- list = talloc_asprintf_append(list, " %s",
- i->compiled[COMPILE_NORMAL]);
-
- if (modobjs)
- list = talloc_append_string(list, modobjs);
-
- /* Other ccan modules (don't need coverage versions of those). */
- list_for_each(&m->deps, subm, list) {
- if (subm->compiled[COMPILE_NORMAL])
- list = talloc_asprintf_append(list, " %s",
- subm->compiled
- [COMPILE_NORMAL]);
- }
-
- return list;
-}
-
-static char *lib_list(const struct manifest *m)
-{
- unsigned int i, num;
- char **libs = get_libs(m, m->dir, &num,
- &m->info_file->compiled[COMPILE_NORMAL]);
- char *ret = talloc_strdup(m, "");
-
- for (i = 0; i < num; i++)
- ret = talloc_asprintf_append(ret, "-l%s ", libs[i]);
- return ret;
-}
-