[Pkg-rust-maintainers] Bug#993871: rustc build ignores DEB_BUILD_OPTIONS=parallel=N

Helmut Grohne helmut at subdivi.de
Tue Sep 7 14:55:03 BST 2021


Source: rustc
Version: 1.49.0+dfsg1-1
Severity: wishlist

When building the rustc package from source, the parallel=N option in
DEB_BUILD_OPTIONS is not honoured. Instead, the number of CPUs available
is used. In particular, a non-parallel build via parallel=1 is not
possible.

According to Ximin Luo, the cargo wrapper automatically passes the
correct -j option for everything but rustc, which matches my
observation. I do hope that you immediately know where this is.

A standard technique for computing the relevant flag is as follows:

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

Helmut



More information about the Pkg-rust-maintainers mailing list