static bool compile_obj(struct ccan_file *c_file, char *objfile, char **report)
{
- char *contents;
+ char *err;
- contents = run_command(objfile, "cc " CFLAGS " -o %s -c %s",
- objfile, c_file->name);
- if (contents) {
+ err = compile_object(objfile, objfile, c_file->name);
+ if (err) {
if (*report)
- *report = talloc_append_string(*report, contents);
+ *report = talloc_append_string(*report, err);
else
- *report = contents;
+ *report = err;
return false;
}
return true;
struct ccan_file *i;
/* One point for each obj file. */
- build_objs.total_score = 0;
list_for_each(&m->c_files, i, list)
build_objs.total_score++;
struct ccanlint build_objs = {
.name = "Module object files can be built",
- .total_score = 1,
.check = check_objs_build,
.describe = describe_objs_build,
.can_run = can_build,