5 const char *gcov; /* = NULL */
7 bool run_gcov(const void *ctx, unsigned int *time_ms, char **output,
10 const char *cmd = gcov;
16 #if defined(__clang__)
17 cmd = "llvm-cov gcov";
18 #elif defined(__GNUC__)
27 args = tal_vfmt(ctx, fmt, ap);
28 rc = run_command(ctx, time_ms, output, "%s %s", cmd, args);
34 const char *gcov_unavailable(void *ctx)
36 const char *err = NULL;
39 * If the user has specified a path, assume they know what
46 unsigned int timeleft = default_timeout_ms;
49 if (!run_gcov(ctx, &timeleft, &output, "-h")) {
50 err = tal_fmt(ctx, "No gcov support: %s", output);
54 err = "No coverage support for this compiler";