[LLVMdev] Command line options being put in Target backend libraries
Eli Bendersky
eliben at google.com
Fri Aug 23 15:41:27 PDT 2013
On Fri, Jul 26, 2013 at 4:03 PM, Shankar Easwaran
<shankare at codeaurora.org>wrote:
> Hi,
>
> I see a lot of command line options being set in Target backend libraries.
> The problem with that is if a third party tool links with Target libraries
> and has a command line option that needs to be processed, the option in the
> Target libraries will get overridden.
>
> $ cd llvm/lib/Target
> $ grep 'cl::' */*.cpp --> produces lot of such occurences.
>
> For example :- libLLVMX86CodeGen.a contains
> libLLVMX86CodeGen.a:**X86RegisterInfo.cpp.o:**0000000000000080 b
> EnableBasePointer
>
> I think those command line options would need to be moved to the drivers
> that are using them, Isnt it ?
>
> Am I mistaken ?
>
> Thanks
This is, of course, a problem not only for Target libraries but for other
parts of LLVM as well. The cl:: infrastructure, by virtue of its
global-ness, allows convenience because options can be added deep inside
libraries without too much plumbing. On the other hand, this causes a large
number of problems - the one you mention is just one of them.
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130823/f9c130d9/attachment.html>
More information about the llvm-dev
mailing list