Open
Description
Several headers in flang require FLANG_BIG_ENDIAN
or FLANG_LITTLE_ENDIAN
to be defined. This causes compile-time errors when using the headers, for example in an out-of-tree flang-based tool. A minimum reproducer is the file below
#include <flang/Frontend/CompilerInvocation.h>
Compiling this in the most straightforward way produces this compile-time error.
include/flang/Common/uint128.h:269:2: error: #error host endianness is not known
This is not ideal. Tools should not be required to specify the host endianness themselves.
I have a draft PR here which replaces these preprocessor defines with equivalents from LLVM.