Marc-André Lureau <marcandre.lur...@gmail.com> writes: > Hi > > On Mon, Oct 2, 2017 at 5:25 PM, Markus Armbruster <arm...@redhat.com> wrote: >> qapi-types.py and qapi-visit.py generate some C code for built-in >> types. To make this work with multiple schemas, we generate code for >> built-ins into .c files only when the user asks for it with -b. The >> user is responsible for linking exactly one set of files generated >> with -b per program. We generate code for built-ins into .h >> regardless of -b, but guard it with a preprocessor symbol. >> >> This is cumbersome and inflexible. Move the code generated for >> built-in types into separate files builtin-qapi-{types,visit}.{c,h}. >> Run qapi-types.py and qapi-visit.py without a schema argument to >> generate them. Drop their option -b. >> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> > > > Good idea! > I think I would still prefer to see a seperate argument to generate > builtin files (rather than absence of schema), but this is minor > detail.
An option to generate built-ins would have to conflict with -p and the positional argument. I tried the stupidest solution that could possibly work first. > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Thanks!