First Last Prev Next    No search results available
Details
: [llvm-ar] Command line arguments have funny syntax
Bug#: 30
: tools
: llvm-ar
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P4
: minor
: 1.1

:
: missing-feature
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Brian R. Gaeke <gaeke+bugs@uiuc.edu>
Assigned To: Tanya Lattner <tonic@nondot.org>
:

Attachments
Partial patch (1.87 KB, patch)
2003-11-11 19:08, Brian R. Gaeke
Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2003-10-10 13:27
The syntax of llvm-ar's command line arguments is strange
to someone who is used to using plain old ar or GNU ar.

For instance, you don't get to specify which action it
will take; it always creates ('c') archives. See the ar(1)
man page for an example of what I am getting at.

It would be really nice if llvm-ar took either the same
kinds of command line options as other versions of ar,
or a subset thereof.

Sorry this is so vague; I don't have
time to explicitly specify all the things that real ar(1)
can do, and the documentation is widely available.
------- Comment #1 From Chris Lattner 2003-10-10 13:32:02 -------
You're certainly right, llvm-ar should be a drop in replacement for the system
ar, which happens to do nice things for LLVM bytecode files (generates a symbol
table).

At this point, llvm-ar is not finished and should not be used, so this is not a
high-priority problem.
------- Comment #2 From Brian R. Gaeke 2003-11-11 19:08:56 -------
Created an attachment (id=19) [details]
Partial patch

Here is a patch which makes llvm-ar accept many common ar options, though
the only variable which actually does anything is still SymbolTableOption.

I have labeled it as a "partial patch" for the following other reason: ar(1) as
described in the Single Unix Specification and in the GNU manual has a syntax
for command-line arguments which is, as far as I can tell, unique. It
superficially resembles the command-line syntax of dump(8)/restore(8) and
tar(1), but it is different in that the argument to the [abi] options must
always precede the name of the archive. So although I appreciate the tasty
goodness of Chris's CommandLine library, and I briefly considered extending it
to support ar(1) argument syntax, I think the right thing to do is *not* to use
cl::ParseCommandLineOptions() in this tool, and instead to write a custom
command-line argument parser.

I'm probably not going to work on this at all for at least another week. Anyone
else have any comments?
------- Comment #3 From Tanya Lattner 2003-12-06 19:36:25 -------
llvm-ar should now have the proper syntax. Note: llvm-ar is not complete.

First Last Prev Next    No search results available