[PATCH] D40849: CodeGen: support an extension to pass linker options on ELF

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 13:52:03 PST 2017


ruiu added a comment.

> I don't think that parsing the options on the LLVM side is a good idea. What if the linker uses a non-GNU style driver? What if there are multiple ways of specifying the option (joined vs separate)? This is something that really should be pushed further down. Can you even do -l library with the GNU driver?

I'd make users pass a key-value pair instead of a single string. A key-value pair is actually more straightforward than passing a single string for something like `#pragma comment(lib, "foo")`, no?

I don't think we should accept more than one way of doing one thing. If we allow -l, we should allow only -l and shouldn't allow any other form of the same option including `--library=foo`, `-library=foo` or -library foo`.


Repository:
  rL LLVM

https://reviews.llvm.org/D40849





More information about the llvm-commits mailing list