[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:05:58 PST 2017


ruiu added a comment.

> @ruiu I had the same concern and thats why I am doing one option per C-style string with an array that is null terminated to represent the options.  If there are options with spaces they will be a string onto themselves.  That is in the test itself (two options: "spaced option" and "nospace").

Could you push it further and make the options key-value pairs instead of just a sequence of strings? In the current form, there's an ambiguity such as "-l /foo/bar" and "-l/foo/bar", and parsing them correctly in the linker is tedious and error-prone (the former could mean a path starting with a space character, for example). The value can be empty if the option doesn't take an argument.


Repository:
  rL LLVM

https://reviews.llvm.org/D40849





More information about the llvm-commits mailing list