[PATCH] [lld][ELF] Add undefined symbol option to lld

Rui Ueyama ruiu at google.com
Tue Jun 18 09:55:01 PDT 2013



================
Comment at: lib/Driver/LDOptions.td:77
@@ +76,3 @@
+    HelpText<"Force symbol to be entered in the output file as an undefined symbol">;
+def u_alias : Joined<["--"], "undefined=">, Alias<u>;
+
----------------
Shankar Kalpathi Easwaran wrote:
> Rui Ueyama wrote:
> > Looks like GNU accepts all the following flags:
> > 
> >  1. -u foo
> >  2. -u=foo
> >  3. --undefined foo
> >  4. --undefined=foo
> > 
> > I think with this patch lld will accept only case 1 and 4. Does the LLVM command option handler the capability to handle all these cases?
> The option handler supports all combinations, will add them.
Ah, ok, if we have four "def"s to support all the combinations, I'd rather don't add the last two. We should improve the option parser itself to support this GNU style options instead. OK only with the first two for now.


http://llvm-reviews.chandlerc.com/D997



More information about the llvm-commits mailing list