[LLVMdev] Possible solution to a llvm-ld bug

Reid Spencer reid at x10sys.com
Sun Mar 5 22:39:11 PST 2006


You're absolutely right. I have updated llvm-ld.cpp to parse the command
line arguments before using LibPaths.  Thanks for the report.

Reid.

On Sat, 2006-03-04 at 23:55 -0800, Wink Saville wrote:
> Hello,
> 
> As previously mentioned I had a linking problem using llvm-ld
> (http://lists.cs.uiuc.edu/pipermail/llvmdev/2006-February/005246.html)
> 
> I was getting a error if I used -L switch when linking using the following command line:
> 
>    llvm-ld  -o t1.app t1.bc t1.a -L/opt/llvm-1.6/llvm-gcc/lib -lcrtend
> 
> I believe I've tracked down the problem; in the "main" of tools/llvm-ld.cpp
> the call to ParseCommandLineOptions is after the TheLinker.addPaths(LibPaths)
> statement so the -L command line parameter is ignored.
> 
> My fix was to move the ParseCommandLineOptions to the beginning of the main routine.
> 
> Cheers,
> 
> Wink Saville
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060305/e1822dfe/attachment.sig>


More information about the llvm-dev mailing list