[LLVMdev] [lld][Options] Sharing common options across flavors

Nick Kledzik kledzik at apple.com
Wed Sep 18 14:53:51 PDT 2013


On Sep 18, 2013, at 2:37 PM, Shankar Easwaran <shankare at codeaurora.org> wrote:
>>> 
>>> I am also thinking of adding a verbose option that would essentially control the various verbose outputs that we might want to have. For example:
>>> 
>>> lld -flavor gnu -target x86_64 --verbose=commandline,trampolines,symbols,reader,writer ....
>>> 
>>> LinkingContext will have two functions :-
>>> 
>>> setVerboseOptions(StringRef) -> stores all the verbose options in a vector.
>>> 
>>> hasVerboseOption(StringRef) -> returns true if the option is present
>>> 
>>> Thoughts on the above ?
>> What do you mean by “verbose”.  Is this like DEBUG_WITH_TYPE()?
> gnu ld has a verbose option that tells the user, whats going on in the linker from how it starts processing the command line to how symbols are being resolved.

If to support that, you need to sprinkle “if (ctx.hasVerboseOption(“blah”))” in common code, then might as well make this available to all drivers that want it.  I can see adding it to the darwin driver to help show what the linker is doing.

-Nick






More information about the llvm-dev mailing list