[lld] r249230 - Add -rpath= alias for -rpath

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 06:03:01 PDT 2015


On 4 October 2015 at 14:40, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> On Fri, Oct 2, 2015 at 11:54 PM, Ed Maste via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: emaste
>> Date: Sat Oct  3 01:54:24 2015
>> New Revision: 249230
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=249230&view=rev
>> Log:
>> Add -rpath= alias for -rpath
>>
>> Modified:
>>     lld/trunk/ELF/Options.td
>>
>> Modified: lld/trunk/ELF/Options.td
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=249230&r1=249229&r2=249230&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/ELF/Options.td (original)
>> +++ lld/trunk/ELF/Options.td Sat Oct  3 01:54:24 2015
>> @@ -75,6 +75,7 @@ def alias_discard_all_x: Flag<["-"], "x"
>>  def alias_discard_locals_X: Flag<["-"], "X">, Alias<discard_locals>;
>>  def alias_entry_e : Separate<["-"], "e">, Alias<entry>;
>>  def alias_l__library : Joined<["--"], "library=">, Alias<l>;
>> +def alias_rpath_rpath : Joined<["-"], "rpath=">, Alias<rpath>;
>>  def alias_soname_h : Separate<["-"], "h">, Alias<soname>;
>>  def alias_soname_soname : Separate<["-"], "soname">, Alias<soname>;
>
>
> Couldn't we use JoinedOrSeparate as we do elsewhere in clang for the rpath
> alias here?  It really is that -rpath may be joined or separate.

That seems to be the case (in GNU ld) for all of these options.
However, an = is necessary for the joined form, and as far as I can
tell JoinedOrSeparate doesn't handle that. That is, -rpathfoo would
also be accepted. JoinedWithEqualsOrSeparate?


More information about the llvm-commits mailing list