[PATCH] D35619: [ELF] - Introduce multiclass Eq helper for Options.td

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 09:11:44 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Options.td:203
 
-def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
-  HelpText<"Path to file to write output">;
+defm output: Eq<"output">, HelpText<"Path to file to write output">,
+  MetaVarName<"<path>">;
----------------
grimar wrote:
> ruiu wrote:
> > I don't think this is correct. If you pass `--output=foo`, it should be interpreted as `-o utput=foo`.
> Both bfd and gold disagree with that:
> 
> umb at umb-virtual-machine:~/tests/502_optionsalias$ ld.bfd -v
> GNU ld (GNU Binutils for Ubuntu) 2.26.1
> umb at umb-virtual-machine:~/tests/502_optionsalias$ ld.gold -v
> GNU gold (GNU Binutils for Ubuntu 2.26.1) 1.11
> umb at umb-virtual-machine:~/tests/502_optionsalias$ ls
> test.o
> umb at umb-virtual-machine:~/tests/502_optionsalias$ ld.gold -shared test.o --output=foo1
> umb at umb-virtual-machine:~/tests/502_optionsalias$ ld.bfd -shared test.o --output=foo2
> umb at umb-virtual-machine:~/tests/502_optionsalias$ ls
> foo1  foo2  test.o
> 
Sorry, I meant `-output=foo`.


https://reviews.llvm.org/D35619





More information about the llvm-commits mailing list