All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@arm.com>
To: meta-arm@lists.yoctoproject.org
Subject: [PATCH 6/8] arm: add recipe for gn
Date: Mon,  4 Oct 2021 20:56:10 +0100	[thread overview]
Message-ID: <20211004195612.188487-6-ross.burton@arm.com> (raw)
In-Reply-To: <20211004195612.188487-1-ross.burton@arm.com>

This is a Google build tool used by Hafnium. It will end up in meta-oe
eventually, but until then it can live here.

Change-Id: I7a3df84624664117a6a72e2d93e86036cb483c39
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-devtools/gn/gn_git.bb | 34 ++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 meta-arm/recipes-devtools/gn/gn_git.bb

diff --git a/meta-arm/recipes-devtools/gn/gn_git.bb b/meta-arm/recipes-devtools/gn/gn_git.bb
new file mode 100644
index 00000000..5962b2d5
--- /dev/null
+++ b/meta-arm/recipes-devtools/gn/gn_git.bb
@@ -0,0 +1,34 @@
+SUMMARY = "GN is a meta-build system that generates build files for Ninja"
+DEPENDS += "ninja-native"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
+
+SRC_URI = "git://gn.googlesource.com/gn;protocol=https;branch=main"
+SRCREV = "69ec4fca1fa69ddadae13f9e6b7507efa0675263"
+PV = "0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
+
+# TODO: os map like meson. mingw32 -> mingw
+
+do_configure[cleandirs] += "${B}"
+do_configure() {
+    python3 ${S}/build/gen.py \
+        --platform=${TARGET_OS} \
+        --host=${HOST_OS} \
+        --out-path=${B} \
+        --no-strip
+}
+
+do_compile() {
+    ninja -C ${B} --verbose
+}
+
+do_install() {
+    install -d ${D}${bindir}
+    install ${B}/gn ${D}${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1



  parent reply	other threads:[~2021-10-04 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 19:56 [PATCH 1/8] arm/hafnium: add missing pkg-config dependency Ross Burton
2021-10-04 19:56 ` [PATCH 2/8] arm/hafnium: remove python symlink workaround Ross Burton
2021-10-04 19:56 ` [PATCH 3/8] arm/hafnium: do out-of-tree builds Ross Burton
2021-10-04 19:56 ` [PATCH 4/8] arm/hafnium: clean up install Ross Burton
2021-10-04 19:56 ` [PATCH 5/8] arm/hafnium: package the ELF in hafnium-dbg Ross Burton
2021-10-04 19:56 ` Ross Burton [this message]
2021-10-04 19:56 ` [PATCH 7/8] arm/hafnium: use our gn/ninja/dtc Ross Burton
2021-10-04 19:56 ` [PATCH 8/8] CI: build a proper TC0 image on x86-64 Ross Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211004195612.188487-6-ross.burton@arm.com \
    --to=ross.burton@arm.com \
    --cc=meta-arm@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.