Include less of the generated modular QAPI headers

In my "build everything" tree, a change to the types in
qapi-schema.json triggers a recompile of about 4800 out of 5100
objects.

The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h,
qapi-types.h. Each of these headers still includes all its shards.
Reduce compile time by including just the shards we actually need.

To illustrate the benefits: adding a type to qapi/migration.json now
recompiles some 2300 instead of 4800 objects. The next commit will
improve it further.

Backports commit 9af2398977a78d37bf184d6ff6bd04c72bfbf006 from qemu
This commit is contained in:
Markus Armbruster 2018-03-09 10:00:47 -05:00 committed by Lioncash
parent fe90858609
commit 5500a5e912
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
9 changed files with 26 additions and 21 deletions

View file

@ -32,9 +32,7 @@
#ifndef QOBJECT_H
#define QOBJECT_H
#include <stddef.h>
#include <assert.h>
#include "qapi-types.h"
#include "qapi-builtin-types.h"
struct QObject {
QType type;

View file

@ -14,10 +14,7 @@
#ifndef QAPI_VISITOR_H
#define QAPI_VISITOR_H
#include "qemu/typedefs.h"
#include "qapi-types.h"
#include "qapi/error.h"
#include <stdlib.h>
#include "qapi-builtin-types.h"
/*
* The QAPI schema defines both a set of C data types, and a QMP wire