[llvm-commits] [patch] Don't bake build info into the host

Rafael Avila de Espindola rafael.espindola at gmail.com
Mon May 9 10:52:09 PDT 2011


While working with 32 bit build of llvm on a 64 bit host I noticed that 
the 32 bit clang was unable to link any program.

The problem was that the basic 32 bit files (like crtbegin.o) are in 
different different paths on i386 and x86_64 hosts. The 32 bit clang was 
assuming it was running on a 32 bit host and failing to find them.

I tracked the problem to getHostTriple. Despite its name, it returns 
information about the build too. The attached patch creates an explicit 
getBuildTriple.

With this patch the 32 bit clang can link binaries on a 64 bit host.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: host.patch
Type: text/x-patch
Size: 2814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110509/e6739805/attachment.bin>


More information about the llvm-commits mailing list