qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 27/29] Include sysemu/sysemu.h a lot less


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 27/29] Include sysemu/sysemu.h a lot less
Date: Wed, 07 Aug 2019 15:51:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Philippe Mathieu-Daudé <address@hidden> writes:

> On 8/6/19 5:14 PM, Markus Armbruster wrote:
>> In my "build everything" tree, changing sysemu/sysemu.h triggers a
>> recompile of some 5400 out of 6600 objects (not counting tests and
>> objects that don't depend on qemu/osdep.h).
>> 
>> hw/qdev-core.h includes sysemu/sysemu.h since recent commit e965ffa70a
>> "qdev: add qdev_add_vm_change_state_handler()".  This is a bad idea:
>> hw/qdev-core.h is widely included.
>> 
>> Move the declaration of qdev_add_vm_change_state_handler() to
>> sysemu/sysemu.h, and drop the problematic include from hw/qdev-core.h.
>> 
>> Touching sysemu/sysemu.h now recompiles some 1800 objects.
>> qemu/uuid.h also drops from 5400 to 1800.  A few more headers show
>> smaller improvement: qemu/notify.h drops from 5600 to 5200,
>> qemu/timer.h from 5600 to 4500, and qapi/qapi-types-run-state.h from
>> 5500 to 5000.
>> 
>> Cc: Stefan Hajnoczi <address@hidden>
>> Signed-off-by: Markus Armbruster <address@hidden>
[...]
>> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
>> index e5b62dd2fc..de70b7a19a 100644
>> --- a/include/hw/qdev-core.h
>> +++ b/include/hw/qdev-core.h
>> @@ -5,7 +5,6 @@
>>  #include "qemu/bitmap.h"
>>  #include "qom/object.h"
>>  #include "hw/hotplug.h"
>> -#include "sysemu/sysemu.h"
>
> Another build errors on OSX:
>
> ui/cocoa.m:445:10: error: use of undeclared identifier 'cursor_hide'
>     if (!cursor_hide) {
>          ^
> ui/cocoa.m:453:10: error: use of undeclared identifier 'cursor_hide'
>     if (!cursor_hide) {
>          ^
> ui/cocoa.m:596:13: error: use of undeclared identifier 'qemu_name'
>         if (qemu_name)
>             ^
> warning: format specifies type 'char *' but the argument has type
> '<dependent type>' [-Wformat]
> ui/cocoa.m:597:75: error: use of undeclared identifier 'qemu_name'
>             [normalWindow setTitle:[NSString stringWithFormat:@"QEMU
> %s", qemu_name]];
>                                                                          ^
> ui/cocoa.m:995:13: error: use of undeclared identifier 'qemu_name'
>         if (qemu_name)
>             ^
> warning: format specifies type 'char *' but the argument has type
> '<dependent type>' [-Wformat]
> ui/cocoa.m:996:117: error: use of undeclared identifier 'qemu_name'
>             [normalWindow setTitle:[NSString stringWithFormat:@"QEMU %s
> - (Press ctrl + alt + g to release Mouse)", qemu_name]];
>
>                                             ^
> ui/cocoa.m:1013:13: error: use of undeclared identifier 'qemu_name'
>         if (qemu_name)
>             ^
> warning: format specifies type 'char *' but the argument has type
> '<dependent type>' [-Wformat]
> ui/cocoa.m:1014:75: error: use of undeclared identifier 'qemu_name'
>             [normalWindow setTitle:[NSString stringWithFormat:@"QEMU
> %s", qemu_name]];
>                                                                           ^
> ui/cocoa.m:1164:5: warning: implicit declaration of function
> 'qemu_system_shutdown_request' is invalid in C99
> [-Wimplicit-function-declaration]
>     qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
>     ^
> ui/cocoa.m:1164:5: warning: this function declaration is not a prototype
> [-Wstrict-prototypes]
> make: *** [ui/cocoa.o] Error 1

Will fix, thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]