This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Make -flto=jobserver parallel again.


Hi.

As I did quite some changes in the LTO logic, revision
r274232 dropped default value of parallel back to 0.
Doing that, I forgot to set it to 1 at the places where
jobserver is detected.

I tested that LTO bootstrap is parallel again.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2019-08-23  Martin Liska  <mliska@suse.cz>

	* lto-wrapper.c (run_gcc): When setting jobserver
	set also parallel to 1.  This was done so before r273908.
---
 gcc/lto-wrapper.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)


diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 68f63da910f..75ed289f3f2 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1374,7 +1374,10 @@ run_gcc (unsigned argc, char *argv[])
 
 	case OPT_flto_:
 	  if (strcmp (option->arg, "jobserver") == 0)
-	    jobserver = 1;
+	    {
+	      parallel = 1;
+	      jobserver = 1;
+	    }
 	  else if (strcmp (option->arg, "auto") == 0)
 	    {
 	      parallel = 1;
@@ -1423,8 +1426,11 @@ run_gcc (unsigned argc, char *argv[])
       auto_parallel = 0;
       parallel = 0;
     }
-  else if (!jobserver)
-    jobserver = jobserver_active_p ();
+  else if (!jobserver && jobserver_active_p ())
+    {
+      parallel = 1;
+      jobserver = 1;
+    }
 
   if (linker_output)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]