Message ID | 20220111145527.3422053-1-aperez@igalia.com |
---|---|
State | Rejected |
Headers | show |
Series | [RFC,1/1] package/wpewebkit: use ninja for faster builds | expand |
Adrian, All, On 2022-01-11 16:55 +0200, Adrian Perez de Castro spake thusly: > Instruct CMake to use the Ninja generator, and override build/install > commands to use Ninja instead, which results in faster builds. The > host-ninja package is required to build some of the dependencies used > by wpewebkit (e.g. libepoxy) so in practice this is not introducing > a new host dependency that would slow down the build. As discussed on IRC, we concluded that a better option is to make the cmake-package infrastructure in Buildroot ninja-aware, and that you were going to have a look at it. Thanks! :-) So, I've marked this patch as rejected in patchwork. Regards, Yann E. MORIN. > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com> > --- > package/wpewebkit/wpewebkit.mk | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk > index 64c179534f..2cbed60cb3 100644 > --- a/package/wpewebkit/wpewebkit.mk > +++ b/package/wpewebkit/wpewebkit.mk > @@ -14,11 +14,12 @@ WPEWEBKIT_LICENSE_FILES = \ > Source/WebCore/LICENSE-LGPL-2.1 > WPEWEBKIT_CPE_ID_VENDOR = wpewebkit > WPEWEBKIT_CPE_ID_PRODUCT = wpe_webkit > -WPEWEBKIT_DEPENDENCIES = host-gperf host-python3 host-ruby \ > +WPEWEBKIT_DEPENDENCIES = host-gperf host-ninja host-python3 host-ruby \ > harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup libtasn1 \ > libpng libxslt openjpeg wayland-protocols webp wpebackend-fdo > > WPEWEBKIT_CONF_OPTS = \ > + -GNinja \ > -DPORT=WPE \ > -DENABLE_ACCESSIBILITY=OFF \ > -DENABLE_API_TESTS=OFF \ > @@ -101,4 +102,24 @@ ifeq ($(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV6)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS > WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON -DENABLE_SAMPLING_PROFILER=OFF > endif > > +define WPEWEBKIT_BUILD_CMDS > + $(TARGET_MAKE_ENV) $(WPEWEBKIT_NINJA_ENV) \ > + $(BR2_CMAKE) --build $(WPEWEBKIT_BUILDDIR) -- $(NINJA_OPTS) $(WPEWEBKIT_NINJA_OPTS) > +endef > + > +define WPEWEBKIT_INSTALL_CMDS > + $(TARGET_MAKE_ENV) $(WPEWEBKIT_NINJA_ENV) \ > + $(BR2_CMAKE) --install $(WPEWEBKIT_BUILDDIR) > +endef > + > +define WPEWEBKIT_INSTALL_STAGING_CMDS > + $(TARGET_MAKE_ENV) $(WPEWEBKIT_NINJA_ENV) DESTDIR=$(STAGING_DIR) \ > + $(BR2_CMAKE) --install $(WPEWEBKIT_BUILDDIR) > +endef > + > +define WPEWEBKIT_INSTALL_TARGET_CMDS > + $(TARGET_MAKE_ENV) $(WPEWEBKIT_MAKE_ENV) DESTDIR=$(TARGET_DIR) \ > + $(BR2_CMAKE) --install $(WPEWEBKIT_BUILDDIR) > +endef > + > $(eval $(cmake-package)) > -- > 2.34.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Yann, all, On Tue, 11 Jan 2022 18:09:18 +0100 "Yann E. MORIN" <yann.morin.1998@free.fr> wrote: > Adrian, All, > > On 2022-01-11 16:55 +0200, Adrian Perez de Castro spake thusly: > > Instruct CMake to use the Ninja generator, and override build/install > > commands to use Ninja instead, which results in faster builds. The > > host-ninja package is required to build some of the dependencies used > > by wpewebkit (e.g. libepoxy) so in practice this is not introducing > > a new host dependency that would slow down the build. > > As discussed on IRC, we concluded that a better option is to make the > cmake-package infrastructure in Buildroot ninja-aware, and that you were > going to have a look at it. Thanks! :-) Here goes: https://patchwork.ozlabs.org/project/buildroot/list/?series=280723 > So, I've marked this patch as rejected in patchwork. Good, as said on IRC, I also agree it worth it to take the long route and try to get all CMake packages (or most, if all is not possible) working with Ninja :) Cheers, —Adrián
diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk index 64c179534f..2cbed60cb3 100644 --- a/package/wpewebkit/wpewebkit.mk +++ b/package/wpewebkit/wpewebkit.mk @@ -14,11 +14,12 @@ WPEWEBKIT_LICENSE_FILES = \ Source/WebCore/LICENSE-LGPL-2.1 WPEWEBKIT_CPE_ID_VENDOR = wpewebkit WPEWEBKIT_CPE_ID_PRODUCT = wpe_webkit -WPEWEBKIT_DEPENDENCIES = host-gperf host-python3 host-ruby \ +WPEWEBKIT_DEPENDENCIES = host-gperf host-ninja host-python3 host-ruby \ harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup libtasn1 \ libpng libxslt openjpeg wayland-protocols webp wpebackend-fdo WPEWEBKIT_CONF_OPTS = \ + -GNinja \ -DPORT=WPE \ -DENABLE_ACCESSIBILITY=OFF \ -DENABLE_API_TESTS=OFF \ @@ -101,4 +102,24 @@ ifeq ($(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV6)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON -DENABLE_SAMPLING_PROFILER=OFF endif +define WPEWEBKIT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(WPEWEBKIT_NINJA_ENV) \ + $(BR2_CMAKE) --build $(WPEWEBKIT_BUILDDIR) -- $(NINJA_OPTS) $(WPEWEBKIT_NINJA_OPTS) +endef + +define WPEWEBKIT_INSTALL_CMDS + $(TARGET_MAKE_ENV) $(WPEWEBKIT_NINJA_ENV) \ + $(BR2_CMAKE) --install $(WPEWEBKIT_BUILDDIR) +endef + +define WPEWEBKIT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(WPEWEBKIT_NINJA_ENV) DESTDIR=$(STAGING_DIR) \ + $(BR2_CMAKE) --install $(WPEWEBKIT_BUILDDIR) +endef + +define WPEWEBKIT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(WPEWEBKIT_MAKE_ENV) DESTDIR=$(TARGET_DIR) \ + $(BR2_CMAKE) --install $(WPEWEBKIT_BUILDDIR) +endef + $(eval $(cmake-package))
Instruct CMake to use the Ninja generator, and override build/install commands to use Ninja instead, which results in faster builds. The host-ninja package is required to build some of the dependencies used by wpewebkit (e.g. libepoxy) so in practice this is not introducing a new host dependency that would slow down the build. Signed-off-by: Adrian Perez de Castro <aperez@igalia.com> --- package/wpewebkit/wpewebkit.mk | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)