aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/meson
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2018-01-04 15:12:37 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-05 12:02:28 +0000
commitde7ae028c65a978969b2e06fdc1a2d08bc141a5b (patch)
tree4f417144b3a6d4b806f65711b1147e56111c78b5 /meta/recipes-devtools/meson/meson
parent32c2faf394ba7bf75a7273fb9f5e58cc4ee3f3ad (diff)
downloadopenembedded-core-contrib-de7ae028c65a978969b2e06fdc1a2d08bc141a5b.tar.gz
meson: export native env only for native build
Although the meson crossfile should take care of setting the right cross environment for a target build, meson slurps any set CFLAGS, CXXFLAGS, LDFLAGS, and CPPFLAGS from the environment and injects them into the build (see mesonbuild/environment.py:get_args_from_envvars for details). This means that we are seeing native CFLAGS, CXXFLAGS, LDFLAGS, and CPPFLAGS in the target build, which is wrong and causes build failures when target and native have libraries in common (the linker gets confused and bails). That said, we *do* need to set certain vars for all builds so that meson can find the right build tools. Without this, meson will fail during its sanity checking step because it will determine the build tools to be unrunnable since they output target instead of native artifacts. The solution to all of this is to set CC, CXX, LD, and AR globally to the native tools while setting the other native vars *only* for the native build. For target builds, these vars will get overridden by the cross file as we expect. Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/meson/meson')
0 files changed, 0 insertions, 0 deletions