]> code.ossystems Code Review - openembedded-core.git/commit
meson.bbclass: warn if cross property defaults are used
authorRoss Burton <ross.burton@intel.com>
Wed, 13 Mar 2019 00:37:33 +0000 (00:37 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jan 2020 16:38:54 +0000 (16:38 +0000)
commit91b74ee03ada5d4517a5d8ef3895cc60f87780aa
tree54bf18104f55bb7b161c007e46188b34d700015b
parented223207e0b6e25c18ce90d8e6fb1e5713d4cd0a
meson.bbclass: warn if cross property defaults are used

The Meson idiom for checks which require running code on the target
(which isn't possible in cross compilation) is to use a cross property,
which the user can set in the cross file:

if cc_can_run
  rres = cc.run(test_foo_code)
  have_foo = rres.compiled() and rres.returncode() == 0
else
  have_foo = meson.get_cross_property('have_foo', false)
endif

The default value may be overly conservative so we should review every
property and explicitly set them as apppropriate.  oe-core 669ddaf added
a log message when the default value is used, so look for this message
and emit a warning that the user will see.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/meson.bbclass