[cfe-dev] Small patches to allow fully independent clang/llvm/compiler-rt/libc++

Daniel Sanders via cfe-dev cfe-dev at lists.llvm.org
Thu Oct 15 12:48:31 PDT 2015


> Yes. Just don't call it triple, because it really isn't.
> 
> $ clang --target mips-linux-gnu
> 
> That's a triple that Clang recognises...
> 
> $ clang --target weird-mips-linux-gnu
> 
> That's not. A modified Clang (in the future) would see this, bail on
> "unknown triple", and fall back to a configuration database, if
> exists.

I'm trying to say that the same mechanism that provides your support for configurations could potentially be the mechanism that handles the differences between one triple used in different contexts.

So for example:
> $ clang --target mips-linux-gnu
Could read a mips-linux-gnu config which was shipped by the distro and on Fedora inject -mips32r2 but on Debian inject -mips2.
________________________________________
From: Renato Golin [renato.golin at linaro.org]
Sent: 15 October 2015 13:44
To: Daniel Sanders
Cc: C Bergström; Marshall Clow; Jonathan Roelofs; cfe-dev at lists.llvm.org
Subject: Re: [cfe-dev] Small patches to allow fully independent clang/llvm/compiler-rt/libc++

On 15 October 2015 at 13:30, Daniel Sanders <Daniel.Sanders at imgtec.com> wrote:
> Just to restate this without the implementation detail: The triple would select a configuration file and that configuration file would inject the command line flags needed to get the right behaviour for that triple. We would then handle inconsistency in triples by changing the configuration files shipped in each distribution.

Yes. Just don't call it triple, because it really isn't.

$ clang --target mips-linux-gnu

That's a triple that Clang recognises...

$ clang --target weird-mips-linux-gnu

That's not. A modified Clang (in the future) would see this, bail on
"unknown triple", and fall back to a configuration database, if
exists.

If not, error out with "unknown triple".

This way we keep triples and configurations absolutely separate, which
is a requirement to keep triples as legacy.

cheers,
--renato



More information about the cfe-dev mailing list