On 2/3/25 02:08, Thomas Huth wrote:
On 03/02/2025 04.18, Richard Henderson wrote:
Use CONFIG_TCG as a project-wide flag to indicate that TCG is enabled
for *some* target.  Use CONFIG_TCG_TARGET to indicate that TCG is
enabled for a specific target.

Within a specific compilation unit, we can remap CONFIG_TCG based on
CONFIG_TCG_TARGET.  This allows us to avoid changes to the bulk of
the code base.

Within meson.build, while CONFIG_TCG may be set in config_host_data,
it may not be set within config_target.  Thus all references to
CONFIG_TCG in source_set 'when:' need not be updated.

For the moment, CONFIG_TCG and CONFIG_TCG_TARGET are identical.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  include/qemu/osdep.h |  7 +++++++
  meson.build          | 11 +++++++----
  2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 112ebdff21..1f6f73a148 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -34,9 +34,16 @@
  #include "config-host.h"
  #ifdef COMPILING_PER_TARGET
  #include CONFIG_TARGET
+# ifdef CONFIG_TCG_TARGET
+#  undef CONFIG_TCG_TARGET
+# else
+#  undef CONFIG_TCG
+# endif
  #else
  #include "exec/poison.h"
  #endif
+#pragma GCC poison CONFIG_TCG_TARGET

Shouldn't that rather go before the "#endif" instead?

Also, would it be possible to rather adjust scripts/make-config-poison.sh instead of poisoning this switch manually?

No, I want to unconditionally poison it so that no other uses are ever 
introduced.


r~

Reply via email to