2015-02-06 07:55:15 +08:00
|
|
|
//===-------------------------- __cxxabi_config.h -------------------------===//
|
|
|
|
//
|
2019-01-19 18:56:40 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-02-06 07:55:15 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ____CXXABI_CONFIG_H
|
|
|
|
#define ____CXXABI_CONFIG_H
|
|
|
|
|
2015-12-04 10:14:41 +08:00
|
|
|
#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
|
2015-02-06 07:55:15 +08:00
|
|
|
!defined(__ARM_DWARF_EH__)
|
2017-03-01 19:42:01 +08:00
|
|
|
#define _LIBCXXABI_ARM_EHABI
|
2015-02-06 07:55:15 +08:00
|
|
|
#endif
|
|
|
|
|
2015-12-04 10:14:58 +08:00
|
|
|
#if !defined(__has_attribute)
|
|
|
|
#define __has_attribute(_attribute_) 0
|
|
|
|
#endif
|
|
|
|
|
2016-09-27 11:44:09 +08:00
|
|
|
#if defined(_WIN32)
|
2016-12-06 03:42:11 +08:00
|
|
|
#if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
|
2016-09-27 11:44:09 +08:00
|
|
|
#define _LIBCXXABI_HIDDEN
|
|
|
|
#define _LIBCXXABI_DATA_VIS
|
|
|
|
#define _LIBCXXABI_FUNC_VIS
|
|
|
|
#define _LIBCXXABI_TYPE_VIS
|
|
|
|
#elif defined(_LIBCXXABI_BUILDING_LIBRARY)
|
2015-12-04 10:14:58 +08:00
|
|
|
#define _LIBCXXABI_HIDDEN
|
2016-05-26 10:12:20 +08:00
|
|
|
#define _LIBCXXABI_DATA_VIS __declspec(dllexport)
|
2015-12-04 10:14:58 +08:00
|
|
|
#define _LIBCXXABI_FUNC_VIS __declspec(dllexport)
|
|
|
|
#define _LIBCXXABI_TYPE_VIS __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define _LIBCXXABI_HIDDEN
|
2016-05-26 10:12:20 +08:00
|
|
|
#define _LIBCXXABI_DATA_VIS __declspec(dllimport)
|
2015-12-04 10:14:58 +08:00
|
|
|
#define _LIBCXXABI_FUNC_VIS __declspec(dllimport)
|
|
|
|
#define _LIBCXXABI_TYPE_VIS __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
#else
|
2016-12-06 03:42:11 +08:00
|
|
|
#if !defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
|
|
|
|
#define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
|
|
|
|
#define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
|
|
|
|
#define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
|
|
|
|
#if __has_attribute(__type_visibility__)
|
|
|
|
#define _LIBCXXABI_TYPE_VIS __attribute__((__type_visibility__("default")))
|
|
|
|
#else
|
|
|
|
#define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
|
|
|
|
#endif
|
2015-12-04 10:14:58 +08:00
|
|
|
#else
|
2016-12-06 03:42:11 +08:00
|
|
|
#define _LIBCXXABI_HIDDEN
|
|
|
|
#define _LIBCXXABI_DATA_VIS
|
|
|
|
#define _LIBCXXABI_FUNC_VIS
|
|
|
|
#define _LIBCXXABI_TYPE_VIS
|
2015-12-04 10:14:58 +08:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-03-01 11:55:57 +08:00
|
|
|
#if defined(_WIN32)
|
|
|
|
#define _LIBCXXABI_WEAK
|
|
|
|
#else
|
|
|
|
#define _LIBCXXABI_WEAK __attribute__((__weak__))
|
|
|
|
#endif
|
|
|
|
|
2018-04-10 06:11:28 +08:00
|
|
|
#if defined(__clang__)
|
|
|
|
#define _LIBCXXABI_COMPILER_CLANG
|
2019-04-12 01:16:35 +08:00
|
|
|
#elif defined(__GNUC__)
|
|
|
|
#define _LIBCXXABI_COMPILER_GCC
|
2018-04-10 06:11:28 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if __has_attribute(__no_sanitize__) && defined(_LIBCXXABI_COMPILER_CLANG)
|
|
|
|
#define _LIBCXXABI_NO_CFI __attribute__((__no_sanitize__("cfi")))
|
|
|
|
#else
|
|
|
|
#define _LIBCXXABI_NO_CFI
|
|
|
|
#endif
|
|
|
|
|
2019-08-14 09:30:48 +08:00
|
|
|
// wasm32 follows the arm32 ABI convention of using 32-bit guard.
|
|
|
|
#if defined(__arm__) || defined(__wasm32__)
|
2019-04-11 01:12:06 +08:00
|
|
|
# define _LIBCXXABI_GUARD_ABI_ARM
|
|
|
|
#endif
|
|
|
|
|
2015-02-06 07:55:15 +08:00
|
|
|
#endif // ____CXXABI_CONFIG_H
|