Browse Source
Rather than compiling the same content for all targets (unused most of the time, i.e. qemu-system-avr ...), extract the non x86 specific parts to a stub file and build it once for all non-x86 targets. Add a Kconfig symbol to only select the target-specific file with the x86 target (rename this file with '-x86' suffix). Since Kconfig symbols aren't evaluated for user emulation, the file unit is only built for system emulation. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260121215622.92966-3-philmd@linaro.org>pull/316/head
5 changed files with 31 additions and 20 deletions
@ -0,0 +1,6 @@ |
|||||
|
# SPDX-License-Identifier: GPL-2.0-or-later |
||||
|
|
||||
|
config WINDUMP |
||||
|
bool |
||||
|
default y if X86_64 |
||||
|
depends on X86_64 |
||||
@ -1,2 +1,3 @@ |
|||||
system_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo]) |
system_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo]) |
||||
specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: files('win_dump.c')) |
specific_ss.add(when: 'CONFIG_WINDUMP', if_true: files('win_dump-x86.c')) |
||||
|
system_ss.add(when: 'CONFIG_WINDUMP', if_false: files('win_dump-stubs.c')) |
||||
|
|||||
@ -0,0 +1,21 @@ |
|||||
|
/*
|
||||
|
* Windows crashdump stubs |
||||
|
* |
||||
|
* SPDX-License-Identifier: GPL-2.0-or-later |
||||
|
*/ |
||||
|
|
||||
|
#include "qemu/osdep.h" |
||||
|
#include "qapi/error.h" |
||||
|
#include "win_dump.h" |
||||
|
|
||||
|
bool win_dump_available(Error **errp) |
||||
|
{ |
||||
|
error_setg(errp, "x86-64 Windows guest dump not built-in"); |
||||
|
|
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
void create_win_dump(DumpState *s, Error **errp) |
||||
|
{ |
||||
|
g_assert_not_reached(); |
||||
|
} |
||||
Loading…
Reference in new issue