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