]> git.ozlabs.org Git - ccan/blobdiff - tools/compile.c
tdb2: update documentation.
[ccan] / tools / compile.c
index fc7dc34789fbcfac6c832fce41ff7b6e0253499c..bf68ad26477644dc8542aaa1414c9d10fda1572b 100644 (file)
@@ -17,10 +17,11 @@ char *link_objects(const void *ctx, const char *objs, char **errmsg)
 
 /* Compile a single C file to an object file.  Returns errmsg if fails. */
 char *compile_object(const void *ctx, const char *cfile, const char *ccandir,
+                    const char *extra_cflags,
                     const char *outfile)
 {
-       return run_command(ctx, NULL, "cc " CFLAGS " -I%s -c -o %s %s",
-                          ccandir, outfile, cfile);
+       return run_command(ctx, NULL, "cc " CFLAGS " -I%s %s -c -o %s %s",
+                          ccandir, extra_cflags, outfile, cfile);
 }
 
 /* Compile and link single C file, with object files.