Description
Non-recursive calls of rustc
from Make in beta warn about the jobserver being there but not being usable. Thus users with calls to rustc
will start to see warnings in their builds unless they start marking the calls as recursive.
Make fills MAKEFLAGS
in all cases in 4.3, i.e. even for non-recursive cases (and in 4.4 only in some cases it passes an invalid pair). Is rustc
going to try to always use the jobserver if it appears to be there even if -Zthreads
is 1? The warning is nice to detect mistakenly non-recursive calls (and the Make manual asks for that), though, but it should probably be not emitted when rustc
is behaving as sequential, i.e. users are not seeing the advantage, right?
Otherwise, if we want to consider this an early warning for projects to update their Makefiles, then I think the diagnostic text should provide a way to disable it easily without changes to the build system so that projects have time to adapt.
a:
echo 'fn main() {}' | rustup run stable rustc -
echo 'fn main() {}' | rustup run beta rustc -
b:
+echo 'fn main() {}' | rustup run stable rustc -
+echo 'fn main() {}' | rustup run beta rustc -
$ make -j2 a
echo 'fn main() {}' | rustup run stable rustc -
echo 'fn main() {}' | rustup run beta rustc -
warning: failed to connect to jobserver from environment variable `MAKEFLAGS=" -j2 --jobserver-auth=3,4"`: cannot open file descriptor 3 from the jobserver environment variable value: Bad file descriptor (os error 9)
|
= note: the build environment is likely misconfigured
$ make -j2 b
echo 'fn main() {}' | rustup run stable rustc -
echo 'fn main() {}' | rustup run beta rustc -
Warning added at #113730
Cc #113349
Cc @belovdv @nnethercote @oksbsb @bjorn3 @SparrowLii
@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged