X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fcompulsory_tests%2Fbuild_objs.c;h=af7a57b73e8482c18f627abfe5d2e0e814222764;hb=63bceea014e091a2f2907e49f7c3b33f042106f4;hp=0768bc6fb70ec685b93e07430e076e582b6648b2;hpb=f952b88b36e3803370825fb43385f1a42aa24b64;p=ccan diff --git a/tools/ccanlint/compulsory_tests/build_objs.c b/tools/ccanlint/compulsory_tests/build_objs.c index 0768bc6f..af7a57b7 100644 --- a/tools/ccanlint/compulsory_tests/build_objs.c +++ b/tools/ccanlint/compulsory_tests/build_objs.c @@ -21,7 +21,8 @@ static const char *can_build(struct manifest *m) return NULL; } -static void *check_objs_build(struct manifest *m) +static void *check_objs_build(struct manifest *m, + bool keep, unsigned int *timeleft) { char *report = NULL; struct ccan_file *i; @@ -33,8 +34,10 @@ static void *check_objs_build(struct manifest *m) /* One point for each obj file. */ build_objs.total_score++; - i->compiled = compile_object(m, fullfile, ccan_dir, &err); - if (!i->compiled) { + i->compiled = maybe_temp_file(m, "", keep, fullfile); + err = compile_object(m, fullfile, ccan_dir, "", i->compiled); + if (err) { + talloc_free(i->compiled); if (report) report = talloc_append_string(report, err); else @@ -50,7 +53,7 @@ static const char *describe_objs_build(struct manifest *m, void *check_result) } struct ccanlint build_objs = { - .key = "build-objs", + .key = "build-objects", .name = "Module object files can be built", .check = check_objs_build, .describe = describe_objs_build,