[Intel-gfx] [PATCH i-g-t 12/12] RFC: meson build system support

Daniel Vetter daniel at ffwll.ch
Mon Sep 4 14:49:51 UTC 2017


On Mon, Sep 04, 2017 at 04:11:17PM +0300, Jani Nikula wrote:
> On Sat, 02 Sep 2017, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> > +if cc.has_member('struct sysinfo', 'totalram',
> > +		prefix : '#include <sys/sysinfo.h>')
> > +	config_h.set('HAVE_STRUCT_SYSINFO_TOTALRAM', 1)
> > +endif
> > +
> > +add_project_arguments('-D_GNU_SOURCE', language : 'c')
> 
> Just something that caught my eye that bit me in the past. The project
> arguments are *not* passed on to feature tests such as
> cc.has_member(). I don't think it matters in this case, but you'll want
> to #define _GNU_SOURCE in the prefix if you're testing for GNU
> stuff. Otherwise you may end up using compat versions. Just a heads up,
> that's all.

Ow, the fun. Well since the only has_member/function check we do have
right now tests for linux vs. solaris, we should probably be safe. Or at
least know really quickly when we're not safe.

For the android stuff, we'll probably just have one switch for is_android,
for all the things missing in bionic. Very obviously I've done none of the
"how should this work on android" thinking yet :-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list