1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-06 04:42:16 +00:00

arm: add recipe for gn

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>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2021-10-04 20:56:10 +01:00
committed by Jon Mason
parent 55e845b3e7
commit b277050bc9

View File

@@ -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"