I want to have dynamic module .flags values, so
I put them in the build.zig.zon and do:
// the zon part:
.flags = .{
"-std=c99",
"-I/usr/local/include",
"-I/home/wise/code/zig/zweb/csrc",
},
To access them inside my build.zig.
and then I do
// this is in build.zig
const zon = @import("build.zig.zon");
...
myfcgi.addCSourceFile(.{
.file = b.path("csrc/myfcgi.c"),
.flags = zon.flags,
});
...
But it’s types do no match up. Is there a way I can wrangle the .flags list from
the zon file to match the .flags struct member getting passed to .addCSourceFile() ?
This is the type signature for that:
I am still learning zig and the idioms.