[gcc(refs/users/marxin/heads/flto=jobserver-N-fallback)] LTO: fallback to -flto=N if -flto=jobserver does not work.

Martin Liska marxin@gcc.gnu.org
Thu Mar 18 15:59:55 GMT 2021


https://gcc.gnu.org/g:1332442808a7668bb9ba548325be4c9b9d1aa3a9

commit 1332442808a7668bb9ba548325be4c9b9d1aa3a9
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Mar 12 13:37:06 2021 +0100

    LTO: fallback to -flto=N if -flto=jobserver does not work.
    
    gcc/ChangeLog:
    
            * lto-wrapper.c (run_gcc): When -flto=jobserver is used, but the
            makeserver cannot be detected, then use -flto=N fallback.

Diff:
---
 gcc/lto-wrapper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 03a5922f8ea..0b626d7c811 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1585,8 +1585,9 @@ run_gcc (unsigned argc, char *argv[])
       if (jobserver && jobserver_error != NULL)
 	{
 	  warning (0, jobserver_error);
-	  parallel = 0;
+	  /* Fall back to auto parallelism.  */
 	  jobserver = 0;
+	  auto_parallel = 1;
 	}
       else if (!jobserver && jobserver_error == NULL)
 	{


More information about the Gcc-cvs mailing list