Bug 1578254 - Trick Make into running rust targets earlier again. r=nalexander
commitd9362c0f8536ce69c26c0ffc9e3a246e6b9b34f2
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 6 Sep 2019 22:58:03 +0000 (6 22:58 +0000)
committerMike Hommey <mh+mozilla@glandium.org>
Fri, 6 Sep 2019 22:58:03 +0000 (6 22:58 +0000)
tree7048857e84f6ac4a790624d8a96e0854f27b9ab7
parentd3fcf657671e1bb771fbbdf29cae8386065ade4f
Bug 1578254 - Trick Make into running rust targets earlier again. r=nalexander

One of the things bug 1567616 did was to change how .cargo/config is
preprocessed, from it happening during configure to it happening during
the build. And to make things happen properly, dependencies were added
on the rust targets to ensure the .cargo/config file is created before
they run.

Unfortunately, that changed the order in which Make would run all the
targets while recursing for the compile tier, when the file doesn't
exist first. So instead of starting the compile tier with rust targets,
it would start with most C++, then do rust... which we know to make
builds slower overall because of the need to wait for those rust builds
to finish which C++ has all been dealt with already, and lacking
parallelism during the rust build.

So we force .cargo/config to be generated during export (which it is not
already because OBJDIR_PP_FILES are currently dealt with during misc).
That makes Make still run the rust targets early during the compile
tier.

And while here, we extend the if block in recurse.mk that excludes all
the top-level recursion dependencies when running from subdirectories.

Differential Revision: https://phabricator.services.mozilla.com/D44992

--HG--
extra : moz-landing-system : lando
config/recurse.mk