[LLVMdev] Clang predefined macros with -fPIC and -fPIE

Siraj, Tareq A tareq.a.siraj at intel.com
Wed Oct 3 08:57:55 PDT 2012

Hello everyone,
Clang seems to only define __PIE__ when both –fPIC and –fPIE is used in the command line whereas gcc defines both __PIC__ and __PIE__. Is this intended or a bug in clang? Thanks.

Command line:
clang -fPIC -fPIE -dM -E - < /dev/null | grep __PI


More information about the llvm-dev mailing list