[NoPatch!] [lld]:What output formats should we support?
Tim Northover
t.p.northover at gmail.com
Fri Jun 20 07:22:00 PDT 2014
Hi,
I was trying to work out the best ways of getting sensible information
out of lld today, and noticed that the MachO output formats are rather
non-orthogonal:
+ Default/YAML/Native in LinkingContext.
+ Exe/Dylib/Object/... in MachOLinkingContext.
+ printAtoms, also in MachOLinkingContext
The latter isn't quite the same, because output always goes to stdout,
and the normal object is still created, but I think it should be in
the same uniform set.
Given that MachO supports YAML for both atoms and its own format, that
top-level enum doesn't quite map to what we might want to output. It
would fit better if it was:
+ HostNative ( == old Default)
+ HostYAML
+ AtomNative (== old Native)
+ AtomYAML (== old YAML)
Then we could drop MachOLinkingContext's _printAtoms, and a
hypothetical _printMachOYAML in favour of a generic "-output_filetype"
option, much like the GNU flavour has.
Does that sound like a reasonable idea to people? I can put together a
patch reasonably quickly if so.
Cheers.
Tim.
More information about the llvm-commits
mailing list