compiler construction - How to capture command line options when writting gcc plugin -
i adding new features on cpp, want write compiler pass modify cpp source codes according different options.(i use gcc feature(cilk) , think cannot done libclang,clang cannot recognize cilk). there api in gcc can such things?
the current gcc plugin api not allow extend preprocessor. however, can add builtins, pragmas, , function or variable attributes.
you use save_decoded_options
, save_decoded_options_count
toplev.h
compiler program arguments. plugins expecting -fplugin-foo-arg-
program arguments (for plugin foo
...)
why need these?
did consider extending gcc melt (a domain specific language extend gcc)?
Comments
Post a Comment