| 1 | //===-- Common defines for sharing LLVM libc with LLVM projects -*- C++ -*-===// |
| 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-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_LIBC_SHARED_LIBC_COMMON_H |
| 10 | #define LLVM_LIBC_SHARED_LIBC_COMMON_H |
| 11 | |
| 12 | // Use system errno by default in non-full builds. |
| 13 | #if !defined(LIBC_ERRNO_MODE) && !defined(LIBC_FULL_BUILD) |
| 14 | #define LIBC_ERRNO_MODE LIBC_ERRNO_MODE_SYSTEM_INLINE |
| 15 | #endif // !defined(LIBC_ERRNO_MODE) && !defined(LIBC_FULL_BUILD) |
| 16 | |
| 17 | // Use system fenv functions in math implementations. |
| 18 | #ifndef LIBC_MATH_USE_SYSTEM_FENV |
| 19 | #define LIBC_MATH_USE_SYSTEM_FENV |
| 20 | #endif // LIBC_MATH_USE_SYSTEM_FENV |
| 21 | |
| 22 | #ifndef LIBC_NAMESPACE |
| 23 | #define LIBC_NAMESPACE __llvm_libc |
| 24 | #endif // LIBC_NAMESPACE |
| 25 | |
| 26 | #endif // LLVM_LIBC_SHARED_LIBC_COMMON_H |
| 27 | |