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

Daniel Dunbar daniel at zuster.org
Mon May 16 12:18:23 PDT 2011


Hi Rafael,

I like the spirit of the patch (making getHostTriple() make sense).
This is going to imply a change in the behavior of the driver since it
uses this to choose the default target, but I think this change makes
sense.

Do we really need getBuildTriple? I don't think there are good reasons
to use it, and find the implementation in the patch confusing to read.
I think we should just eliminate it if possible.

 - Daniel

On Mon, May 9, 2011 at 10:52 AM, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> 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
>



More information about the llvm-commits mailing list