On Wed, Apr 29, 2009 at 1:19 PM, Matthieu CASTET <span dir="ltr"><<a href="mailto:castet.matthieu@free.fr">castet.matthieu@free.fr</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Chris Lattner <clattner@...> writes:<br>
<br>
><br>
> What OS are you developing on?  If you're on the mac, or if you use<br>
> the new Binutils "gold" linker for linux, you might have a solution.<br>
> Otherwise, the fix is "don't do that".<br>
><br>
<br>
</div>Why llvm-ld isn't enough ?</blockquote><div><br>For many uses, it would be...<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
After some basic test caaling llvm-ld (instead of gcc) with the transformation<br>
(sed -e "s/-Wl,/-Xlinker=/g" -e "s/-l/-l=/g") seems to produce working output.<br>
<br>
Why clang can't be a wrapper around llvm-ld ?</blockquote><div><br>Primarily because no one has written the code yet. Its also worth pointing out that llvm-ld by itself isn't enough to emulate the features of full LTO support, for example on Darwin one can mix Mach-O objects and LLVM bit-code files with ar, ld, etc. and things should just work. Using llvm-ld would handle some cases, but not all.<br>
<br>The right long term solution is to find a way to get real LTO support on other platforms, this work is progressing but I have no idea what kind of time frame to expect. In the short term adding llvm-ld support in the clang driver would at least allow some very useful things to work (like passing clang with -emit-llvm to configure, currently this will normally fail because clang with -emit-llvm can't generate the test executables).<br>
<br>If you would like to see this work, please file a bug with test cases you care about. And or a patch! :)<br><br> - Daniel<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888">
Matthieu<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br>