Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH RFC 1/1] package/wpewebkit: use ninja for faster builds
@ 2022-01-11 14:55 Adrian Perez de Castro
  2022-01-11 17:09 ` Yann E. MORIN
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Perez de Castro @ 2022-01-11 14:55 UTC (permalink / raw)
  To: buildroot; +Cc: Adrian Perez de Castro

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(-)

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

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

end of thread, other threads:[~2022-01-12 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-11 14:55 [Buildroot] [PATCH RFC 1/1] package/wpewebkit: use ninja for faster builds Adrian Perez de Castro
2022-01-11 17:09 ` Yann E. MORIN
2022-01-12 13:29   ` Adrian Perez de Castro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox