public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6040] lto: set nthreads_var to 1 if it is zero
@ 2020-12-15  9:07 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2020-12-15  9:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cab1b0ebc00ea53040afcbe4b91e653a87915092

commit r11-6040-gcab1b0ebc00ea53040afcbe4b91e653a87915092
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Dec 15 09:59:04 2020 +0100

    lto: set nthreads_var to 1 if it is zero
    
    gcc/ChangeLog:
    
            PR lto/98275
            * lto-wrapper.c: Do not use -j0 when we are unable to detect
            number of cores.

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

diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 68ccb156521..da1305c1696 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1780,6 +1780,8 @@ cont1:
 	{
 	  char buf[256];
 	  init_num_threads ();
+	  if (nthreads_var == 0)
+	    nthreads_var = 1;
 	  if (verbose)
 	    fprintf (stderr, "LTO parallelism level set to %ld\n",
 		     nthreads_var);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-15  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15  9:07 [gcc r11-6040] lto: set nthreads_var to 1 if it is zero Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).