[llvm-dev] Supporting sub commands in LLVM command line tools
Zachary Turner via llvm-dev
llvm-dev at lists.llvm.org
Tue Jun 21 13:47:24 PDT 2016
Is anyone willing to / interested in reviewing the patch? Or perhaps
suggesting a good person to add to the reviewer list?
On Sat, Jun 18, 2016 at 3:58 PM Robinson, Paul via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
>
> > -----Original Message-----
> > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of
> > Renato Golin via llvm-dev
> > Sent: Saturday, June 18, 2016 4:02 AM
> > To: Mehdi Amini
> > Cc: llvm-dev
> > Subject: Re: [llvm-dev] Supporting sub commands in LLVM command line
> tools
> >
> > On 18 June 2016 at 02:58, Mehdi Amini via llvm-dev
> > <llvm-dev at lists.llvm.org> wrote:
> > > I haven't looked at the implementation, but conceptually this looks
> > nice!
> >
> > Indeed, really nice!
> >
> >
> > > We talked internally about an option to build something like a single
> > "llvm"
> > > binary that would be symlinked by opt/llc/etc. So that when you invoke
> > > `opt`, it would run the same binary but internally the right subcommand
> > set
> > > of options would be used. The downside is that running `ninja llvm-mc`
> > would
> > > depends on every LLVM libraries though.
> >
> > I think this would muddle things, but it would also help merge all
> > command line options (ex. -mtriple vs. -triple vs -target).
>
> We get some of that with include/llvm/CodeGen/CommandFlags.h, which
> mostly has flags to package up TargetOptions but also a few other
> common things. But getting more consistency across the tools, with
> or without commonizing the tool itself, seems like it could only be
> a good thing.
> --paulr
>
> >
> > The only way I know we could solve the dependency, though, is if there
> > was a binary called "llvm-mc" from "llvm-mc.cpp" which provided its
> > own view of the "llvm-mc" functionality (ie. just a shell), and "llvm"
> > would be also just a shell to all of them together.
> >
> > So, "ninja llvm" would build all tools, while "ninja llvm-mc" would
> > only build one of them. Now, how do you then transform from a binary
> > called "llvm-mc" to a symlink to "llvm", it'd probably happen at
> > install time if you choose to install "developer tools", which I find
> > quite useful from say, an "llvm-dev" package.
> >
> >
> > > This is a bit orthogonal to what you’re doing, but I assume your patch
> > would
> > > help to build such an option right?
> >
> > Unless you're proposing to move from "llvm-mv" to "llvm mc", I don't
> > see how this could...
> >
> > cheers,
> > --renato
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160621/37ee4606/attachment.html>
More information about the llvm-dev
mailing list