[llvm] r186705 - s/compiler_used/compiler.used/.

Shuxin Yang shuxin.llvm at gmail.com
Sat Jul 20 09:44:39 PDT 2013


On Darwin, the /path/to/libLTO.dylib is passed to ld via environment 
variable instead of
argument, which is source of many trouble especially in the situations 
when two compilers are involved.

I recently find a trick to avoid passing env variable to ld, it works 
for me. But I have not yet got chance
to read to ld source code to verify if it design to be so.

The trick is simply do 'ln -s /usr/bin/ld $(dirname 
the/path/to/the/compiler)/ld"

It seems when mycc=/the/path/to/the/compiler is invoked, the $(dirname 
mycc)/ld, instead of /usr/bin/ld
is invoked, and ld seems to be smart enough to pick up libLTO.dylib from 
$(dirname mycc)/../lib, and
we don't have to set DYLD_LIBRARY_PATH.

Again, this is trick work, maybe only for me. I have not yet got chance 
to read the code to verify
if it designed to be so.

On 7/20/13 7:55 AM, Rafael EspĂ­ndola wrote:
> On 20 July 2013 10:48, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>> looking
>>
> it looks like it is the prebuillt binary that is crashing:
>
> DYLD_LIBRARY_PATH=/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-Rlto/host-compiler/lib
>
> so this change probably just found a bug in it. I have started a two
> stage bootstrap where the second stage uses LTO. It would probably be
> a good idea for the bot to do the same. In the meantime, can you
> upgrade the hast compiler?
>
> Cheers,
> Rafael
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list