[llvm-commits] [PATCH] Re-introduce llvm::sys::getHostTriple() function.
Peter Collingbourne
peter at pcc.me.uk
Fri Jan 4 14:12:40 PST 2013
On Fri, Jan 04, 2013 at 10:40:13PM +0100, Joerg Sonnenberger wrote:
> On Fri, Jan 04, 2013 at 01:13:28PM -0800, Peter Collingbourne wrote:
> > I think you are trying to argue that the host triple is not exactly
> > the same concept as "some triple that will work for JITing functions
> > to be called by the current process". If we define the host triple
> > to mean whatever is reported by config.guess or similar tools, I would
> > agree (the getHostTriple function introduced by this patch attempts
> > to produce the latter). Perhaps a different name should be chosen
> > for this function (getDefaultJITTriple?) This would also clarify
> > the function's purpose.
>
> Correct. getThisProcessesTriple() would be a mouthfull, but more the
> intention. Now the question is, does your patch provide that? I don't
> think it does, since I can still pass e.g. -m32 via CXXFLAGS?
It does:
> if (sizeof(void *) == 8 && HT.isArch32Bit())
> HT = HT.get64BitArchVariant();
> if (sizeof(void *) == 4 && HT.isArch64Bit())
> HT = HT.get32BitArchVariant();
If -m64 is supplied on a 32-bit host, this code will switch the
triple to the 64-bit variant, similarly for -m32 on a 64-bit host.
Thanks,
--
Peter
More information about the llvm-commits
mailing list