|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v4 6/7] dump: Build once by adding stubs for non-x86 targets |
Date: | Fri, 24 Feb 2023 07:53:01 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
On 24/2/23 00:51, Richard Henderson wrote:
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote:Extract non-x86 stubs to win_dump-stub.c. We can now build dump.o once for system emulation. Update meson. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- dump/dump.c | 14 -------------- dump/meson.build | 6 ++++-- dump/win_dump-stub.c | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 dump/win_dump-stub.c
diff --git a/dump/meson.build b/dump/meson.build index 2eff29c3ea..6ae07e6fed 100644 --- a/dump/meson.build +++ b/dump/meson.build @@ -1,4 +1,6 @@ softmmu_ss.add(files('dump-hmp-cmds.c'))-specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) -specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], if_true: files('win_dump.c')) +softmmu_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo])+specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], + if_true: files('win_dump.c'), + if_false: files('win_dump-stub.c'))Doesn't this add win_dump-stub.c when !(SOFTMMU && X86_64), i.e. !SOFTMMU || !X86_64?I trying to imagine how well this will scale with ARM64, for the ongoing Windows on ARM project. Would it just be easier have the stubs in win_dump.c, using ifdefs?
Yeah I realized that later, keeping one single file with #ifdef'ry even simplifies meson rules. I over-engineered that :) Also various methods from win_dump.c could be reused.
[Prev in Thread] | Current Thread | [Next in Thread] |