Expect DLL builds on Windows by default and require a custom __config for static
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. llvm-svn: 282449
Loading
Please register or sign in to comment