aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-12-15 09:59:04 +0100
committerMartin Liska <mliska@suse.cz>2020-12-15 10:07:37 +0100
commitcab1b0ebc00ea53040afcbe4b91e653a87915092 (patch)
treea8c683a230778b5f3cfdc5e8ccbb2d0be388c9bb /gcc/lto-wrapper.c
parent59482fa1e7243bd905c7e27c92ae2b89c79fff87 (diff)
downloadgcc-cab1b0ebc00ea53040afcbe4b91e653a87915092.zip
gcc-cab1b0ebc00ea53040afcbe4b91e653a87915092.tar.gz
gcc-cab1b0ebc00ea53040afcbe4b91e653a87915092.tar.bz2
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.
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r--gcc/lto-wrapper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 68ccb15..da1305c 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);