mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-08 05:09:56 +00:00
arm/gn: map the platform identifiers
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> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user