[llvm-commits] [PATCH][GNU Build] Add LLVM_IS_TARGET_BIG_ENDIAN to config.h

Chris Lattner clattner at apple.com
Thu Oct 21 23:13:51 PDT 2010


On Oct 21, 2010, at 6:59 PM, Michael Spencer wrote:

> On Thu, Oct 21, 2010 at 7:01 PM, Dale Johannesen <dalej at apple.com> wrote:
>> I may have missed earlier discussion, but why do you want this at compile time?  Normally llvm is built to support multiple targets (not necessarily all of the same endianness) and endianness is checked at runtime; see TargetData.
> 
> This is for the host target. It is used when working with endian
> dependent data such as object files.

I still don't get it.  If you want the endianness of the host, you can use llvm/System/Host.h.

Nothing about the target should be hard coded in at compile time.  You should be able to make elf .o files for both powerpc and x86 etc.

-Chris



More information about the llvm-commits mailing list