When do build tools (that are dependencies) need to be packaged?

I'm working on some packages that depend on build tools that aren't in OpenWrt, and I'm trying to figure out when such a build tool needs to be packaged itself as well, or when it's appropriate to say it's a dependency for the host system. For example:

  • I have some Rust programs. Do I need to package up the whole Rust toolchain and build it as part of the whole build process? Because it's also possible to just have the build host use Rustup to install Cargo and the appropriate cross-compiling toolchain eg. via rustup target add mipsel-unknown-linux-musl.

  • I have some code that uses Premake to generate build files (like CMake but with Lua). Do I need to package up Premake for the buildroot or can I just run it on the host?

If I look at other projects, like the Go language packages in the official repo, it seems like the entire toolchain is cross compiled. Premake is an analog of CMake, and CMake is built in the buildroot, so maybe I should do the same for Premake...? But on the other and builthand, various bootstrap-related build tools and dev headers need to be installed on the host system. It's certainly easier to simply document a toolchain as a host dependency and not agonise over some toolchain package makefile.

Is there a rule here? Or some reasoning underlying when and why certain tools are built in the buildroot instead of being run on the host?

the only host tools installed for building are the ones needed to setup the build environment ( generate the core building tools from source )

in other words... the self contained toolchain is to be used for (almost) everything. host tools make the toolchain.

external toolchain options exist... though they are 'non-standard' therefore outcomes can be unpredictable and less scalable.

might seem like that initially... then try to reproduce it on 1000+ desktops consistently...

1 Like

Yes that makes sense. Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.