[PATCH] D19015: [LTO] ensure lto_codegen_debug_options() are passed on to LLVM
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 10:11:33 PDT 2016
probinson added a comment.
In http://reviews.llvm.org/D19015#400001, @joker.eph wrote:
> > Thanks for the information @probinson
>
> > I was imagining the way to configure codegen via the C API would be to add a new function: lto_codegen_configure(lto_codegen_t cg, char ** argv, int argc);
>
>
> You got me wrong: the problem is not with the name of the API, it is with the fact that we don't want *any command line* argument, i.e. we should never call `cl::ParseCommandLineOptions` as part of a normal flow (i.e. other than debug).
Passing in string options is not the objection that I understood (from previous this-is-a-library discussion). The problem is that cl::opt parses them *using static data* and that's not good for a library. Parsing string options to an API that then implemented the parsing without using static data would be fine.
http://reviews.llvm.org/D19015
More information about the llvm-commits
mailing list