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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 09:07:33 PDT 2017


grimar 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>">;
----------------
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



https://reviews.llvm.org/D35619





More information about the llvm-commits mailing list