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

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 08:36:18 PDT 2015


On Tuesday, October 6, 2015, Ed Maste <emaste at freebsd.org> wrote:

> On 4 October 2015 at 14:40, Saleem Abdulrasool <compnerd at compnerd.org
> <javascript:;>> wrote:
> > On Fri, Oct 2, 2015 at 11:54 PM, Ed Maste via llvm-commits
> > <llvm-commits at lists.llvm.org <javascript:;>> 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?
>

Yeah, that would work.  The idea is that many arguments are going to be of
this form, so might as well as make it easy.


-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151006/c1a50567/attachment.html>


More information about the llvm-commits mailing list