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);
33 const char *gcov_unavailable(void *ctx)
35 const char *err = NULL;
38 * If the user has specified a path, assume they know what
45 unsigned int timeleft = default_timeout_ms;
48 if (!run_gcov(ctx, &timeleft, &output, "-h")) {
49 err = tal_fmt(ctx, "No gcov support: %s", output);
53 err = "No coverage support for this compiler";