mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-17 04:37:19 +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
|
# Where the meson.build build configuration is
|
||||||
MESON_SOURCEPATH = "${S}"
|
MESON_SOURCEPATH = "${S}"
|
||||||
|
|
||||||
# These variables in the environment override the *native* tools not the cross,
|
# These variables in the environment override the *native* tools, not the cross.
|
||||||
# so they need to be unexported.
|
export CC = "${BUILD_CC}"
|
||||||
CC[unexport] = "1"
|
export CXX = "${BUILD_CXX}"
|
||||||
|
export LD = "${BUILD_LD}"
|
||||||
|
export AR = "${BUILD_AR}"
|
||||||
|
|
||||||
def noprefix(var, d):
|
def noprefix(var, d):
|
||||||
return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
|
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}"
|
EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
|
||||||
|
|
||||||
|
MESON_CROSS_FILE = ""
|
||||||
|
MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
|
||||||
|
|
||||||
def meson_array(var, d):
|
def meson_array(var, d):
|
||||||
return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
|
return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
|
||||||
|
|
||||||
@@ -75,7 +80,7 @@ EOF
|
|||||||
CONFIGURE_FILES = "meson.build"
|
CONFIGURE_FILES = "meson.build"
|
||||||
|
|
||||||
meson_do_configure() {
|
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
|
cat ${B}/meson-logs/meson-log.txt
|
||||||
bbfatal_log meson failed
|
bbfatal_log meson failed
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user