mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 23:48:20 +00:00
meson.bbclass: Support building for native
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Martin Jansa
parent
08164e4c9d
commit
7fb45590ff
@@ -9,9 +9,11 @@ do_configure[cleandirs] = "${B}"
|
||||
# Where the meson.build build configuration is
|
||||
MESON_SOURCEPATH = "${S}"
|
||||
|
||||
# These variables in the environment override the *native* tools not the cross,
|
||||
# so they need to be unexported.
|
||||
CC[unexport] = "1"
|
||||
# These variables in the environment override the *native* tools, not the cross.
|
||||
export CC = "${BUILD_CC}"
|
||||
export CXX = "${BUILD_CXX}"
|
||||
export LD = "${BUILD_LD}"
|
||||
export AR = "${BUILD_AR}"
|
||||
|
||||
def noprefix(var, d):
|
||||
return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
|
||||
@@ -37,6 +39,9 @@ MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big',
|
||||
|
||||
EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
|
||||
|
||||
MESON_CROSS_FILE = ""
|
||||
MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
|
||||
|
||||
def meson_array(var, d):
|
||||
return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
|
||||
|
||||
@@ -75,7 +80,7 @@ EOF
|
||||
CONFIGURE_FILES = "meson.build"
|
||||
|
||||
meson_do_configure() {
|
||||
if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" --cross-file ${WORKDIR}/meson.cross ${EXTRA_OEMESON}; then
|
||||
if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
|
||||
cat ${B}/meson-logs/meson-log.txt
|
||||
bbfatal_log meson failed
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user