[cfe-dev] [RFC][Preprocessor] Add a macro for -fno-gnu-inline-asm

Bruno Cardoso Lopes via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 24 17:13:33 PDT 2016


Hi,

When building with -fno-gnu-inline-asm and -fmodules on Darwin, the
compilation might fail if some of the implicit modules try to use gnu
asm inline. For instance, it's an issue that happens when with LLVM
installed headers, e.g., building _Builtin_intrinsics because of
inline asm in cpuid.h

To solve that, and potential related issues, I propose to add the
__CLANG_NO_GNU_INLINE_ASM macro when -fno-gnu-inline-asm is used,
allowing the user to reason in the preprocessor level.

A simple patch that implement this is here: https://reviews.llvm.org/D23859

Suggestions? Alternative ideas?

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc



More information about the cfe-dev mailing list