I'm building a research prototype which requires some custom source annotation such as:
#[do_something_llvm]
fn foo() {}
I'm trying to understand the best high-level approach to implement this and pass the metadata to LLVM so I can write a pass to make use of it. AFAIK compiler plugin is no longer a thing.
then your LLVM pass can look for things with section .my_special_section and then process those, making sure to remove the static or change the section back to .text as appropriate.