From mboxrd@z Thu Jan 1 00:00:00 1970 From: Romain Naour Date: Thu, 18 Feb 2021 21:32:42 +0100 Subject: [Buildroot] [PATCH] package/rust: disable ninja In-Reply-To: References: <20210217232411.290242-1-romain.naour@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello Arnout, Le 18/02/2021 ? 20:00, Arnout Vandecappelle a ?crit?: > > > On 18/02/2021 00:24, Romain Naour wrote: >> Ninja has recently be enabled as the default build system to build >> llvm fork for rust compiler [1]. But we can still use Make if >> "ninja = false" is provided in config.toml. >> >> Ninja support can be enabled by a following patch. >> >> [1] https://github.com/rust-lang/rust/commit/30b7dac745b1555cd96f41977f7d24435cbe7fa2 > > That commit reports a speedup of about 2 minutes in build time (on a highly > parallel system). I guess that on a lowlier system, the build time will still > improve by more than the 10 seconds it takes to build ninja... Yes, but the rust package was using Make build system until recently. I'm not sure if we should switch to ninja for 2021.02 release. > > So I'd propose to instead just add > > HOST_RUST_DEPENDENCIES += ninja You mean host-ninja > > (Note that long-term, I'd like to switch to ninja build for CMake packages in > general. Not that rust is a cmake package, but llvm is.) That was already suggested long time ago but the benefit was rather small at that time: http://patchwork.ozlabs.org/project/buildroot/patch/20170106223748.2203-1-cedric.marie at openmailbox.org/ Best regards, Romain > > Regards, > Arnout > >> >> Fixes: >> https://gitlab.com/buildroot.org/buildroot/-/jobs/1019386205 >> >> Signed-off-by: Romain Naour >> Cc: Eric Le Bihan >> --- >> package/rust/rust.mk | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/package/rust/rust.mk b/package/rust/rust.mk >> index 798450e04e..a38a3d64f5 100644 >> --- a/package/rust/rust.mk >> +++ b/package/rust/rust.mk >> @@ -65,6 +65,8 @@ define HOST_RUST_CONFIGURE_CMDS >> echo 'channel = "stable"'; \ >> echo '[target.$(RUSTC_TARGET_NAME)]'; \ >> echo 'cc = "$(TARGET_CROSS)gcc"'; \ >> + echo '[llvm]'; \ >> + echo 'ninja = false'; \ >> ) > $(@D)/config.toml >> endef >> >>