X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Ftests_compile.c;fp=tools%2Fccanlint%2Ftests%2Ftests_compile.c;h=13a8f0dbaadfb92c22232a3ccf802d2cbc157e04;hb=104125b2dd0a044fb3d68f9bc3b1b18c9f32ae2b;hp=473d55f821b668368a2aa673b16ded2096ca49e9;hpb=e169f82bbe459c6cfb80d5180f3ceb61a66a52ed;p=ccan diff --git a/tools/ccanlint/tests/tests_compile.c b/tools/ccanlint/tests/tests_compile.c index 473d55f8..13a8f0db 100644 --- a/tools/ccanlint/tests/tests_compile.c +++ b/tools/ccanlint/tests/tests_compile.c @@ -66,10 +66,12 @@ static bool compile(const void *ctx, bool link_with_module, bool keep, char **output) { + char *f = talloc_asprintf(ctx, "%s%s", + fail ? "-DFAIL " : "", cflags); + file->compiled = maybe_temp_file(ctx, "", keep, file->fullname); if (!compile_and_link(ctx, file->fullname, ccan_dir, - obj_list(m, link_with_module), - fail ? "-DFAIL" : "", + obj_list(m, link_with_module), compiler, f, lib_list(m), file->compiled, output)) { talloc_free(file->compiled); return false;