[cfe-dev] [LLVMdev] AArch64 Clang CLI interface proposal

Renato Golin renato.golin at linaro.org
Wed Jun 25 05:57:29 PDT 2014


On 25 June 2014 13:45, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
> One thing that I've been pondering for a little while is making clang's use of the triple a config file.  In particular, we'd like to invoke things like mips4-unknown-freebsd-clang and have it really mean 'clang -target mips64-unknown-freebsd -mcpu=mips4 -msoft-float --sysroot=/usr/local/sysroots/mips4 {whatever}'.  For cross compiles, we'd only need one clang, a symlink, and a config file.  I pondered a more structured config file, but really there isn't much that we'd want to do that isn't already covered by command-line arguments, so just having it look for ${LOCALBASE}/etc/llvm/mips4-unknown-freebsd-clang.conf would be fine.

On this subject, what if the build system (autoconf / cmake / etc)
could, based on its own arguments, build the command line
automatically, based on the host architecture, target triple and other
flags? Wouldn't that solve the problem of having config files AND the
problem of an extra bash script?

However, I think this is independent of the CLI change, that needs to
be saner no matter how we solve cross-compilation. I still believe
that the CLI could have different ways of detecting target properties
(triple, flags, config files) but all of them should plug into the
same common infrastructure, ie. arch + feature flags to -cc1.

cheers,
--renato




More information about the cfe-dev mailing list