cpu-target: build compilation unit once for user/system

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250730220519.1140447-2-pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
Pierrick Bouvier
2025-07-30 15:05:17 -07:00
committed by Philippe Mathieu-Daudé
parent 01b6fb3705
commit 38838f0837
3 changed files with 6 additions and 6 deletions

View File

@@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
#include "cpu.h"
#include "accel/accel-cpu-ops.h"
#include "system/cpus.h"
#include "exec/cpu-common.h"
@@ -27,10 +26,6 @@
#include "hw/core/cpu.h"
#include "trace/trace-root.h"
/* Validate correct placement of CPUArchState. */
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
/* enable or disable single step mode. EXCP_DEBUG is returned by the
CPU loop after each instruction */
void cpu_single_step(CPUState *cpu, int enabled)

View File

@@ -3876,7 +3876,8 @@ if have_block
endif
common_ss.add(files('cpu-common.c'))
specific_ss.add(files('cpu-target.c'))
user_ss.add(files('cpu-target.c'))
system_ss.add(files('cpu-target.c'))
subdir('system')

View File

@@ -12,6 +12,10 @@
#include "hw/boards.h"
#include "cpu.h"
/* Validate correct placement of CPUArchState. */
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
static const TargetInfo target_info_stub = {
.target_name = TARGET_NAME,
.target_arch = SYS_EMU_TARGET__MAX,