X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fasync.c;h=9c7a442ee64fabcbd8a3a581a3f79e85ebbac725;hp=32a67d29add913cbc2c4ae3f557b91534d87456b;hb=4640e61b45d8d3cdfc5301bc58ef7c96a42077ec;hpb=0ce66a11534211efcddc6f7f1be0ccad38d2258f diff --git a/tools/ccanlint/async.c b/tools/ccanlint/async.c index 32a67d29..9c7a442e 100644 --- a/tools/ccanlint/async.c +++ b/tools/ccanlint/async.c @@ -198,3 +198,18 @@ void *collect_command(bool *ok, char **output) talloc_free(c); return (void *)ctx; } + +/* Compile and link single C file, with object files, async. */ +void compile_and_link_async(const void *ctx, unsigned int time_ms, + const char *cfile, const char *ccandir, + const char *objs, const char *compiler, + const char *cflags, + const char *libs, const char *outfile) +{ + if (compile_verbose) + printf("Compiling and linking (async) %s\n", outfile); + run_command_async(ctx, time_ms, + "%s %s -I%s -o %s %s %s %s", + compiler, cflags, + ccandir, outfile, cfile, objs, libs); +}