Message ID | 20250430145838.1790471-12-pierrick.bouvier@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | single-binary: compile target/arm twice | expand |
On 4/30/25 07:58, Pierrick Bouvier wrote:
> +arm_common_system_ss.add(files('cpu.c'), capstone)
I wonder if we should inherit these dependencies from common_ss or system_ss?
r~
On 4/30/25 11:50 AM, Richard Henderson wrote: > On 4/30/25 07:58, Pierrick Bouvier wrote: >> +arm_common_system_ss.add(files('cpu.c'), capstone) > > I wonder if we should inherit these dependencies from common_ss or system_ss? > I ran into the same issue when working on hw/arm [1], and didn't really look for a way to do this from main meson.build. I thought that it's a good thing to document those kind of dependencies next to the sources who depend on them, so I didn't dig too much. That said, I'm not opposed to it if you feel your approach is better. [1] hw/arm/meson.build -arm_ss.add(files('boot.c')) +arm_common_ss.add(fdt, files('boot.c')) -arm_ss.add(when: 'CONFIG_MUSICPAL', if_true: files('musicpal.c')) +arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicpal.c')]) > > r~
diff --git a/target/arm/meson.build b/target/arm/meson.build index c39ddc4427b..89e305eb56a 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -1,6 +1,6 @@ arm_ss = ss.source_set() +arm_common_ss = ss.source_set() arm_ss.add(files( - 'cpu.c', 'debug_helper.c', 'gdbstub.c', 'helper.c', @@ -20,6 +20,7 @@ arm_ss.add(when: 'TARGET_AARCH64', ) arm_system_ss = ss.source_set() +arm_common_system_ss = ss.source_set() arm_system_ss.add(files( 'arch_dump.c', 'arm-powerctl.c', @@ -30,6 +31,9 @@ arm_system_ss.add(files( )) arm_user_ss = ss.source_set() +arm_user_ss.add(files('cpu.c')) + +arm_common_system_ss.add(files('cpu.c'), capstone) subdir('hvf') @@ -42,3 +46,5 @@ endif target_arch += {'arm': arm_ss} target_system_arch += {'arm': arm_system_ss} target_user_arch += {'arm': arm_user_ss} +target_common_arch += {'arm': arm_common_ss} +target_common_system_arch += {'arm': arm_common_system_ss}
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- target/arm/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)