]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/build_objs.c
ccanlint: only compile _info once; speeds tdb test from 18 to 16 seconds.
[ccan] / tools / ccanlint / tests / build_objs.c
index d932ec74a36145db6e69fba006d639654fbc03bb..e0ea222350bc981ed3075270a0db3ee7459cf1f1 100644 (file)
@@ -23,15 +23,14 @@ static const char *can_build(struct manifest *m)
 
 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;