[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using GNU make jobserver from GCC
From: |
Jan Hubicka |
Subject: |
Using GNU make jobserver from GCC |
Date: |
Mon, 19 May 2014 00:48:56 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello,
GCC LTO implementation has ability to execute multiple parallel compilations
(see -flto switch documentation).
This is implemented by streaming out several object files, producing a makefile
and then executing
sub-make command. -flto=n makes GCC to pass -j=n to the submake, while
-flto=jobserv makes GCC to pass
-j=jobserv to the submake.
Now there are two problems, first is that GCC also parallelize its streaming
phase internally (not via make)
and in this case -flto=jobserv is ignored, because GCC does not know how to
communicate with the Make's
jobserver. Other problem is that -flto=jobserv requires changes to Makefile
where "+" needs to be added
so proper variables are passed.
I wonder if thre can be any additional support from GNU's make to make "+"
unnecesary and if it would
be possible to spearate client side of GNU Make's jobserver into separate file
that can be spossibly
shared in between GNU make and GCC - perhaps via liberty library?
Thanks,
Honza