Path: blob/main/contrib/llvm-project/libcxx/include/__configuration/platform.h
35259 views
// -*- C++ -*-1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//89#ifndef _LIBCPP___CONFIGURATION_PLATFORM_H10#define _LIBCPP___CONFIGURATION_PLATFORM_H1112#include <__config_site>1314#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER15# pragma GCC system_header16#endif1718#if defined(__ELF__)19# define _LIBCPP_OBJECT_FORMAT_ELF 120#elif defined(__MACH__)21# define _LIBCPP_OBJECT_FORMAT_MACHO 122#elif defined(_WIN32)23# define _LIBCPP_OBJECT_FORMAT_COFF 124#elif defined(__wasm__)25# define _LIBCPP_OBJECT_FORMAT_WASM 126#elif defined(_AIX)27# define _LIBCPP_OBJECT_FORMAT_XCOFF 128#else29// ... add new file formats here ...30#endif3132// Need to detect which libc we're using if we're on Linux.33#if defined(__linux__)34# include <features.h>35# if defined(__GLIBC_PREREQ)36# define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)37# else38# define _LIBCPP_GLIBC_PREREQ(a, b) 039# endif // defined(__GLIBC_PREREQ)40#endif // defined(__linux__)4142#ifndef __BYTE_ORDER__43# error \44"Your compiler doesn't seem to define __BYTE_ORDER__, which is required by libc++ to know the endianness of your target platform"45#endif4647#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__48# define _LIBCPP_LITTLE_ENDIAN49#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__50# define _LIBCPP_BIG_ENDIAN51#endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__5253#endif // _LIBCPP___CONFIGURATION_PLATFORM_H545556