From: Ross Burton <ross.burton@arm.com>
To: meta-arm@lists.yoctoproject.org
Subject: [PATCH 3/4] arm/gn: map the platform identifiers
Date: Wed, 6 Oct 2021 16:38:17 +0100 [thread overview]
Message-ID: <20211006153818.3948831-3-ross.burton@arm.com> (raw)
In-Reply-To: <20211006153818.3948831-1-ross.burton@arm.com>
GN uses its own platform identifiers, so map from our GNU-style names to
the names it expects.
Change-Id: I361536c43f2a9cc5c6dc0a9ad4138433399781d2
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta-arm/recipes-devtools/gn/gn_git.bb | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/meta-arm/recipes-devtools/gn/gn_git.bb b/meta-arm/recipes-devtools/gn/gn_git.bb
index 93c3dc01..522a7efe 100644
--- a/meta-arm/recipes-devtools/gn/gn_git.bb
+++ b/meta-arm/recipes-devtools/gn/gn_git.bb
@@ -11,17 +11,25 @@ PV = "0+git${SRCPV}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
-# TODO: os map like meson. mingw32 -> mingw
-
# Currently fails to build with clang, eg:
# https://errors.yoctoproject.org/Errors/Details/610602/
# https://errors.yoctoproject.org/Errors/Details/610486/
TOOLCHAIN = "gcc"
+# Map from our _OS strings to the GN's platform values.
+def gn_platform(variable, d):
+ os = d.getVar(variable)
+ if "linux" in os:
+ return "linux"
+ elif "mingw" in os:
+ return "mingw"
+ else:
+ return os
+
do_configure[cleandirs] += "${B}"
do_configure() {
python3 ${S}/build/gen.py \
- --platform=${TARGET_OS} \
+ --platform=${@gn_platform("TARGET_OS", d)} \
--out-path=${B} \
--no-strip
}
--
2.25.1
next prev parent reply other threads:[~2021-10-06 15:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-06 15:38 [PATCH 1/4] arm/gn: don't build with clang Ross Burton
2021-10-06 15:38 ` [PATCH 2/4] arm/gn: remove nativesdk Ross Burton
2021-10-06 15:38 ` Ross Burton [this message]
2021-10-06 15:38 ` [PATCH 4/4] arm/gn: don't statically link libstdc++ 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=20211006153818.3948831-3-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.