[distcc] Re: Eight little patches for distcc

Guy Maor guyqmaor at gmail.com
Tue May 23 19:13:21 GMT 2006


Hi Michael, I was trying to apply your distcc patch so that l could
limit the number of local links.  Our make system builds a bunch of
.a's, and it frequently ends up invoking many ar's in parallel.

I found that your patch doesn't work because the --localslots never
gets parsed. In compile.c, dcc_build_somewhere() makes the decision to
invoke locally right away after calling dcc_scan_args().  The hosts
data only gets parsed a few lines later by dcc_pick_host_from_list().

I had to modify the patch by adding this, on top of your patch:
@@ -128,6 +128,12 @@
     if (dcc_scan_args(argv, &input_fname, &output_fname, &argv) != 0) {
         /* we need to scan the arguments even if we already know it's
          * local, so that we can pick up distcc client options. */
+
+        /* pick up a --localslots options, if any */
+        struct dcc_hostdef *hostlist;
+        int n_hosts;
+        dcc_get_hostlist(&hostlist, &n_hosts);
+
         goto lock_local;


I was wondering how it worked for you without this?  My make system is
just doing "distcc ar ..."

As an aside to the distcc maintainers, if the hosts file grows to
start including more general-purpose options, its parsing probably
ought to be separated from host selection.  Thanks for a great tool!

Guy


More information about the distcc mailing list