builds. On Windows the __declspec(dllimport) and __declspec(dllexport) attributes require linking to a DLL, not a static library. Previously these annotations were disabled by default unless _LIBCPP_DLL was defined. However the DLL configuration is probably the more common one, so it should be supported by default. This patch enables import/export attributes by default and adds a _LIBCPP_DISABLE_DLL_IMPORT_EXPORT macro which can be used to disable this behavior. If libc++ is built as a static library on Windows then a custom __config header will be generated that predefines this macro. This patch is based off work by Shoaib Meenai. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@282449 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
964 B
Plaintext
27 lines
964 B
Plaintext
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _LIBCPP_CONFIG_SITE
|
|
#define _LIBCPP_CONFIG_SITE
|
|
|
|
#cmakedefine _LIBCPP_ABI_VERSION @_LIBCPP_ABI_VERSION@
|
|
#cmakedefine _LIBCPP_ABI_UNSTABLE
|
|
#cmakedefine _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
|
|
#cmakedefine _LIBCPP_HAS_NO_STDIN
|
|
#cmakedefine _LIBCPP_HAS_NO_STDOUT
|
|
#cmakedefine _LIBCPP_HAS_NO_THREADS
|
|
#cmakedefine _LIBCPP_HAS_NO_MONOTONIC_CLOCK
|
|
#cmakedefine _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
|
|
#cmakedefine _LIBCPP_HAS_MUSL_LIBC
|
|
#cmakedefine _LIBCPP_HAS_THREAD_API_PTHREAD
|
|
#cmakedefine _LIBCPP_HAS_THREAD_API_EXTERNAL
|
|
#cmakedefine _LIBCPP_DISABLE_DLL_IMPORT_EXPORT
|
|
|
|
#endif // _LIBCPP_CONFIG_SITE
|