Re: [PATCH v2 05/14] tcg: Link only when required in system mode

2025-02-03 Thread Alex Bennée
Richard Henderson  writes:

> Rather than unconditional linkage via system_ss, conditinally
> include the static library via specific_ss.  This will elide
> the code when CONFIG_TCG is disabled for a specific target.
>
> Signed-off-by: Richard Henderson 

Reviewed-by: Alex Bennée 

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



Re: [PATCH v2 05/14] tcg: Link only when required in system mode

2025-02-03 Thread Thomas Huth

On 03/02/2025 04.18, Richard Henderson wrote:

Rather than unconditional linkage via system_ss, conditinally
include the static library via specific_ss.  This will elide
the code when CONFIG_TCG is disabled for a specific target.

Signed-off-by: Richard Henderson 
---
  tcg/meson.build | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tcg/meson.build b/tcg/meson.build
index 2977df5862..8266bcb324 100644
--- a/tcg/meson.build
+++ b/tcg/meson.build
@@ -49,4 +49,8 @@ libtcg_system = static_library('tcg_system',
  
  tcg_system = declare_dependency(objects: libtcg_system.extract_all_objects(recursive: false),

  dependencies: tcg_ss.dependencies())
-system_ss.add(tcg_system)
+
+specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: 
tcg_system)
+if host_os == 'linux'
+  specific_ss.add(when: 'CONFIG_TCG', if_false: files('perf-stubs.c'))
+endif


Reviewed-by: Thomas Huth