* [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
* Re: [Buildroot] [PATCH RFC 1/1] package/wpewebkit: use ninja for faster builds
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
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2022-01-11 17:09 UTC (permalink / raw)
To: Adrian Perez de Castro; +Cc: buildroot
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
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH RFC 1/1] package/wpewebkit: use ninja for faster builds
2022-01-11 17:09 ` Yann E. MORIN
@ 2022-01-12 13:29 ` Adrian Perez de Castro
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Perez de Castro @ 2022-01-12 13:29 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: buildroot
[-- Attachment #1.1: Type: text/plain, Size: 1040 bytes --]
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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [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 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.