lto: no sub-make when --jobserver-auth= is missing

We newly correctly detect that a job server is not active for
a LTO linking:

lto-wrapper: warning: jobserver is not available: '--jobserver-auth=' is not present in 'MAKEFLAGS'

In that situation we should not call make -f abc.mk as it can leed
to N^2 LTRANS units.

gcc/ChangeLog:

	* lto-wrapper.c (run_gcc): Do not use sub-make when jobserver is
	not detected properly.
This commit is contained in:
Martin Liska 2020-10-26 18:56:52 +01:00
parent 953a9d63d4
commit 119295372f

View File

@ -1582,7 +1582,11 @@ run_gcc (unsigned argc, char *argv[])
{
const char *jobserver_error = jobserver_active_p ();
if (jobserver && jobserver_error != NULL)
warning (0, jobserver_error);
{
warning (0, jobserver_error);
parallel = 0;
jobserver = 0;
}
else if (!jobserver && jobserver_error == NULL)
{
parallel = 1;