X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Ftests_compile_coverage.c;h=ea46e79e1bc3d8df15cac0aeb2889ca526ff4e81;hp=508057fa0d3b2d9ad61361211c01e92a94c48dc8;hb=104125b2dd0a044fb3d68f9bc3b1b18c9f32ae2b;hpb=e169f82bbe459c6cfb80d5180f3ceb61a66a52ed;ds=sidebyside diff --git a/tools/ccanlint/tests/tests_compile_coverage.c b/tools/ccanlint/tests/tests_compile_coverage.c index 508057fa..ea46e79e 100644 --- a/tools/ccanlint/tests/tests_compile_coverage.c +++ b/tools/ccanlint/tests/tests_compile_coverage.c @@ -38,7 +38,7 @@ static bool build_module_objs_with_coverage(struct manifest *m, bool keep, char *fullfile = talloc_asprintf(m, "%s/%s", m->dir, i->name); i->cov_compiled = maybe_temp_file(m, "", keep, fullfile); - if (!compile_object(m, fullfile, ccan_dir, "", + if (!compile_object(m, fullfile, ccan_dir, compiler, cflags, i->cov_compiled, &err)) { score_file_error(score, i, 0, "%s", err); talloc_free(i->cov_compiled); @@ -93,11 +93,12 @@ static char *cov_compile(const void *ctx, bool keep) { char *output; + char *f = talloc_asprintf(ctx, "%s %s", cflags, COVERAGE_CFLAGS); file->cov_compiled = maybe_temp_file(ctx, "", keep, file->fullname); if (!compile_and_link(ctx, file->fullname, ccan_dir, obj_list(m, modobjs), - COVERAGE_CFLAGS, + compiler, f, lib_list(m), file->cov_compiled, &output)) { talloc_free(file->cov_compiled); file->cov_compiled = NULL;