On Fri, Mar 24, 2017 at 6:05 PM, Michael Biebl <bi...@debian.org> wrote:
> a/ Add support for DEB_BUILD_OPTIONS="parallel=N"? > By default ninja runs N jobs in parallel, where N is derived > from the number of CPUs. > Should this be only done for the build step or install and test as well? > In the latter case, the code to run buildcmd should be factored out. > Or do we just keep ninja's default behaviour and don't bother setting -j > manually. 'ninja install' only invokes Meson's internal installer program. It always runs single threaded. 'ninja test' invokes Meson's test runner. By default it uses N processes to run tests where N is the number of processors. This can be overridden with the environment variable MESON_TESTTHREADS. > In theory, meson does support cross building > https://github.com/mesonbuild/meson/wiki/Cross-compilation > > I personally do not have experience with it though. So I would need help > with implementing that or leave that to someone else. I wouldn't make > this a blocker though, for merging meson/ninja support. For cross compilation Meson requires a "cross file" describing the toolchain and environment to use. These should probably be provided by the dh_meson package (you need one per target platform). After that cross compilation is just a matter of adding --cross-file=/path/to/toolchain/file. I'm not sure how Debian's cross environment works in detail, but Meson expects to also find the native compiler. If /usr/bin/cc (et al) points to the native compiler then everything is fine, otherwise the build runner needs to set CC, CXX et al.