Path: blob/main/contrib/llvm-project/libcxx/include/__cxx03/__configuration/compiler.h
213799 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___CXX03___CONFIGURATION_COMPILER_H10#define _LIBCPP___CXX03___CONFIGURATION_COMPILER_H1112#include <__cxx03/__configuration/config_site_shim.h>1314#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER15# pragma GCC system_header16#endif1718#if defined(__apple_build_version__)19// Given AppleClang XX.Y.Z, _LIBCPP_APPLE_CLANG_VER is XXYZ (e.g. AppleClang 14.0.3 => 1403)20# define _LIBCPP_COMPILER_CLANG_BASED21# define _LIBCPP_APPLE_CLANG_VER (__apple_build_version__ / 10000)22#elif defined(__clang__)23# define _LIBCPP_COMPILER_CLANG_BASED24# define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)25#elif defined(__GNUC__)26# define _LIBCPP_COMPILER_GCC27# define _LIBCPP_GCC_VER (__GNUC__ * 100 + __GNUC_MINOR__)28#endif2930#ifdef __cplusplus3132// Warn if a compiler version is used that is not supported anymore33// LLVM RELEASE Update the minimum compiler versions34# if defined(_LIBCPP_CLANG_VER)35# if _LIBCPP_CLANG_VER < 170036# warning "Libc++ only supports Clang 17 and later"37# endif38# elif defined(_LIBCPP_APPLE_CLANG_VER)39# if _LIBCPP_APPLE_CLANG_VER < 150040# warning "Libc++ only supports AppleClang 15 and later"41# endif42# elif defined(_LIBCPP_GCC_VER)43# if _LIBCPP_GCC_VER < 140044# warning "Libc++ only supports GCC 14 and later"45# endif46# endif4748#endif4950#endif // _LIBCPP___CXX03___CONFIGURATION_COMPILER_H515253