[cfe-dev] new predefined macros to expose target triple values?

John Ericson via cfe-dev cfe-dev at lists.llvm.org
Fri Mar 16 15:52:08 PDT 2018


 > I posted a patch https://reviews.llvm.org/D41087 
<https://reviews.llvm.org/D41087> that implements Saleem’s idea (without 
auxiliary target support).
 > Cheers,
 > Alex

Hello,

I'm very concerned about the "target" in the "__is_target_" prefix of 
these macros, because the way it conflicts with the standard Autoconf 
terminology. We call the clang flag '-target' because we are choosing 
the compiler's target platform. But that becomes the *host* platform for 
the program being compiled. The target platform for the program being 
compiled would instead be what *that* program targets, assuming it is 
some sort of single-target tool.

Now, I'm all for every programming tool becoming multi-target like 
LLVM's, but until we get there, I think "__is_host_" will be the far 
less confusing option with the full spectrum of programs someone might 
want to compile.

John




More information about the cfe-dev mailing list