diff mbox series

[RFC,3/6] target/xtensa: Move xtensa-isa.c to common_ss[]

Message ID 20250103231738.65413-4-philmd@linaro.org
State New
Headers show
Series disas: Allow linking multiple disassemblers in a heterogeneous binary | expand

Commit Message

Philippe Mathieu-Daudé Jan. 3, 2025, 11:17 p.m. UTC
The Xtensa disassembler (selected with CONFIG_XTENSA_DIS=y)
uses methods defined in xtensa-isa.c, so this file has to be
compiled when the disassembler is linked.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/xtensa/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Henderson Jan. 5, 2025, 12:58 a.m. UTC | #1
On 1/3/25 15:17, Philippe Mathieu-Daudé wrote:
> The Xtensa disassembler (selected with CONFIG_XTENSA_DIS=y)
> uses methods defined in xtensa-isa.c, so this file has to be
> compiled when the disassembler is linked.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/xtensa/meson.build | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/target/xtensa/meson.build b/target/xtensa/meson.build
> index f8d60101e3d..68ebfe2582d 100644
> --- a/target/xtensa/meson.build
> +++ b/target/xtensa/meson.build
> @@ -12,9 +12,10 @@ xtensa_ss.add(files(
>     'op_helper.c',
>     'translate.c',
>     'win_helper.c',
> -  'xtensa-isa.c',
>   ))
>   
> +common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa-isa.c'))
> +
>   xtensa_system_ss = ss.source_set()
>   xtensa_system_ss.add(files(
>     'dbg_helper.c',

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/target/xtensa/meson.build b/target/xtensa/meson.build
index f8d60101e3d..68ebfe2582d 100644
--- a/target/xtensa/meson.build
+++ b/target/xtensa/meson.build
@@ -12,9 +12,10 @@  xtensa_ss.add(files(
   'op_helper.c',
   'translate.c',
   'win_helper.c',
-  'xtensa-isa.c',
 ))
 
+common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa-isa.c'))
+
 xtensa_system_ss = ss.source_set()
 xtensa_system_ss.add(files(
   'dbg_helper.c',