This allows syntax like:
$ llvm-ar -c -r -u file.a file.o
This is in addition to the other formats that are already supported:
$ llvm-ar cru file.a file.o
$ llvm-ar -cru file.a file.o
Differential D44452
[llvm-ar] Support multiple dashed options thomasanderson on Mar 13 2018, 5:20 PM. Authored by
Details This allows syntax like: This is in addition to the other formats that are already supported:
Diff Detail Event TimelineComment Actions Did you consider writing a custom parser as was mentioned on the bug? It really seems like it would make the code better rather than going through these contortions to fit the parsing into llvm::cl.
Comment Actions Yeah, but there's still a lot of general options -M - =generic - Emit generic NEON assembly =apple - Emit Apple-style NEON assembly -arm-add-build-attributes - =always - Accept in both ISAs, emit implicit ITs in Thumb =never - Warn in ARM, reject in Thumb =arm - Accept in ARM, reject in Thumb =thumb - Warn in ARM, emit implicit ITs in Thumb -enable-packed-inlinable-literals - Enable packed inlinable literals (v2f16, v2i16) =default - default =gnu - gnu =darwin - darwin =bsd - bsd -gpsize=<uint> - Global Pointer Addressing Size. The default size is 8. =v60 - Build for HVX v60 =v62 - Build for HVX v62 =v65 - Build for HVX v65 = - -mno-compound - Disable looking for compound instructions for Hexagon I feel like it's easier just to use llvm::cl directly. Comment Actions
Most of those options are irrelevant to llvm-ar and should not appear in its help output. The ones that we care about are --format, -M and --plugin, and we can easily parse them ourselves. Comment Actions Ah, that's a good point. If you think it's worth it, I can give the custom parser a try
Comment Actions Also you'll have to land this for me, since I don't have write permissions in the repo Comment Actions It looks like the following tests started failing with your change: LLVM :: Object/archive-GNU64-write.test LLVM :: Object/mri5.test Can you please take a look?
|
I would lose the "Gener*ptions" headers (here and below), they aren't really providing much information.