Closed niclashoyer closed 8 years ago
Can one of the admins verify this patch?
that's actually a known PITA for me (as svd files are a mess). You can get ioreg source code from within the macro, but you can't pass any flags to the compiler that are available in the plugin scope AFAIK. What we can do, maybe, is to store generated code to intermediate dir? Not sure if it's available somehow.
Yes I thought about that, too. So one could just browse some directory inside target
that contains only expanded files. Unfortunately I did not find any flags to generate something like that using cargo.
You can get a set of --cfg
s from plugin, trigger on, say, emit_ioreg
and dump all ioreg generated source to file from within the plugin.
This looks very handy. I have manually done this several times for the ioreg
definitions as well both to debug and as a quick way to remind myself of what methods are provided.
We don't have a Makefile
anymore in the build system at all, this patch is pretty obsolete, and I'm going to go ahead and close it. If you want to somehow add this to the current build system, please rebase off of master
and re-submit.
I added an
expand
target that'll print the expanded source code to stdout.As for now it will just print the example program. Does anyone know if it is possible to expand different files, e.g. a register definition containing
ioregs!
, so one could verify the generated structs?