package/wpewebkit: use ninja for faster builds
RFC PATCH 1/1 package/wpewebkit: use ninja for faster builds
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.
--- package/wpewebkit/wpewebkit.mk | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
package/wpewebkit/wpewebkit.mk +22 -1
@@ -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))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Adrian, All,
On 2022-01-11 16:55 +0200, Adrian Perez de Castro spake thusly:
Quoted 5 lines
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.
Quoted 55 lines
Signed-off-by Adrian Perez de Castro <[email protected]>--- package/wpewebkit/wpewebkit.mk | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)package/wpewebkit/wpewebkit.mk +22
-1@@ -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))Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Yann, all,
Quoted 9 lines · On Tue, 11 Jan 2022 18:09:18 +0100 "Yann E. MORIN" <[email protected]>…
Adrian, All,
On 2022-01-11 16:55 +0200, Adrian Perez de Castro spake thusly:
Quoted 5 lines
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.
Quoted 3 lines
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
Quoted 1 line
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
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot