qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] [broken] meson: try link tracepoints to module


From: Paolo Bonzini
Subject: Re: [PATCH 4/4] [broken] meson: try link tracepoints to module
Date: Fri, 20 Nov 2020 14:05:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 20/11/20 12:25, Gerd Hoffmann wrote:
   Hi,

Guess I'll go dig into the meson documentation, this looks more like a
build system than a tracing problem to me.

Looking at https://mesonbuild.com/Syntax.html ...

"all objects are immutable".

So "var2 = var1" creates a copy not a reference I guess?

Which implies that ...

        foo_ss.add(something)

... is different from ...

        bar_ss = foo_ss
        bar_ss.add(something)

... which in turn explains why the patch doesn't work at all.

Now I'm wondering how I can make trace/meson.build add the trace
objects to the module source sets if I can't pass around references
to the module source sets?

Paolo?  Any hints how to tackle this the meson way?

You could build a separate dictionary in trace/meson.build. Instead of using the 'hw_display_qxl' group, you use the module name i.e. 'hw-display-qxl'. trace/meson.build does:

  module_trace = {}

and in trace/meson.build

  module_trace_src = []
  foreach c : ...
    ...
    group = '--group=' + c['name'].underscorify()
    module_trace_src += [trace_h, trace_c]
    ...
    module_trace += { c['name']: module_trace_src }
  endforeach

Then when building the shared_module you add the trace files to the sources, like

   module_trace_src = module_trace.get(d + '-' + m, [])
   sl = static_library(d + '-' + m,
                       [genh, module_ss.sources(), module_trace_src],
                       dependencies: ...)

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]