All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH RFC 0/2] Use Ninja as build tool for CMake-based packages
@ 2022-01-12 13:26 Adrian Perez de Castro
  2022-01-12 13:26 ` [Buildroot] [PATCH RFC 1/2] package/ninja: do not require cmake Adrian Perez de Castro
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Adrian Perez de Castro @ 2022-01-12 13:26 UTC (permalink / raw)
  To: buildroot; +Cc: Eric Le Bihan, Samuel Martin, Thomas Petazzoni

Hello everybody,

As discussed yesterday, here is a quick stab for testing and getting the
conversation started about using Ninja for CMake-based packages (hence the
missing documentation updates and the "RFC" tag in the subject :-D).

In order to avoid the circular dependency of host-ninja requiring itself,
ninja.mk gets changed to use host-generic-package with a build command
that plainly runs the compiler on the set of sources we know are needed
to build a minimal usable version of it under Unix-y systems. This is
basically the list of sources that CMake would have picked (as per the
CMakeLists.txt file) passed straight to $(HOSTCXX).

The next change modifies pkg-cmake.mk to always pass -GNinja and removes
the $(<PKG>_INSTALL[_STAGING,_TARGET]_OPTS) variables, because when using
Ninja the "install/fast" targets are not generated by CMake (those are
an internal detail of the Makefile generator, it seems). For consistency
with the Meson package infrastructure variables $(NINJA), $(<PKG>_NINJA_ENV)
and $(NINJA_OPTS) are honored by the default set of build/install commands.

Now, there might be packages that break with this, and I would be
particularly concerned about things like packages which use CMake and
build out-of-tree kernel modules (as the kernel build infrastructure is
all Make, and only Make!) but the changes included were enough for me
to get Raspberry Pi images built with WebKit (both GTK and WPE ports)
in it, which results in the following built using [host-]cmake-package:

  - brotli
  - cog
  - jpeg-turbo
  - openjpeg
  - webkitgtk
  - webp
  - woff2
  - wpewebkit

While not a long list by any means, I think it shows a decent sample of
packages coming from different development teams that work just fine
switching to Ninja.

If anybody can suggest something with a bigger number of CMake packages to
build (or a .config file to share) I will be more than happy to give it a
test this with these patches applied :)

Cheers,
-Adrian


Adrian Perez de Castro (2):
  package/ninja: do not require cmake
  package/pkg-cmake.mk: use ninja instead of make

 package/ninja/ninja.mk | 36 +++++++++++++++++++++++++++++++++++-
 package/pkg-cmake.mk   | 24 ++++++++++++++----------
 2 files changed, 49 insertions(+), 11 deletions(-)

-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-07-24 13:18 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 13:26 [Buildroot] [PATCH RFC 0/2] Use Ninja as build tool for CMake-based packages Adrian Perez de Castro
2022-01-12 13:26 ` [Buildroot] [PATCH RFC 1/2] package/ninja: do not require cmake Adrian Perez de Castro
2022-01-21 15:42   ` [Buildroot] [PATCH RFC v2 0/7] Use Ninja as build tool for CMake-based packages Adrian Perez de Castro
2022-01-21 15:42     ` [Buildroot] [PATCH RFC v2 1/7] package/ninja: do not require cmake Adrian Perez de Castro
2022-01-21 15:42     ` [Buildroot] [PATCH RFC v2 2/7] package/pkg-cmake.mk: use ninja instead of make Adrian Perez de Castro
2022-07-24 13:16       ` Arnout Vandecappelle
2022-01-21 15:42     ` [Buildroot] [PATCH RFC v2 3/7] package/musepack: use MUSEPACK_NINJA_OPTS Adrian Perez de Castro
2022-07-24 13:18       ` Arnout Vandecappelle
2022-01-21 15:42     ` [Buildroot] [PATCH RFC v2 4/7] package/mariadb: use HOST_MARIADB_NINJA_OPTS Adrian Perez de Castro
2022-01-21 15:42     ` [Buildroot] [PATCH RFC v2 5/7] package/kf5/kf5-extra-cmake-modules: do not build documentation Adrian Perez de Castro
2022-01-21 15:42     ` [Buildroot] [PATCH RFC v2 6/7] package/libcorrect: avoid multiple rules for same target Adrian Perez de Castro
2022-01-21 15:42     ` [Buildroot] [PATCH RFC v2 7/7] package/racehound: add patch to support building with ninja Adrian Perez de Castro
2022-01-21 15:53     ` [Buildroot] [PATCH RFC v2 0/7] Use Ninja as build tool for CMake-based packages Adrian Perez de Castro
2022-01-12 13:26 ` [Buildroot] [PATCH RFC 2/2] package/pkg-cmake.mk: use ninja instead of make Adrian Perez de Castro
2022-01-12 14:35   ` Thomas Petazzoni
2022-01-12 16:51     ` Adrian Perez de Castro
2022-01-12 14:36 ` [Buildroot] [PATCH RFC 0/2] Use Ninja as build tool for CMake-based packages Thomas Petazzoni
2022-01-12 15:09   ` Adrian Perez de Castro
2022-01-12 16:02     ` Thomas Petazzoni
2022-01-12 16:05 ` Alexander Dahl
2022-01-12 16:47   ` Adrian Perez de Castro
2022-01-12 18:55     ` Arnout Vandecappelle
2022-01-13 15:49       ` Thomas Petazzoni
2022-05-05 21:35         ` James Hilliard
2022-07-24 13:05 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.