[libcxx-commits] [PATCH] D152652: [libc++] Merge _LIBCPP_FUNC_VIS, _LIBCPP_TYPE_VIS and _LIBCPP_EXCEPTION_ABI into _LIBCPP_EXPORTED_FROM_ABI

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 16 21:54:50 PDT 2023


EricWF added a comment.

For the record, the need for different macros comes from Windows which, in the past, has needed to distinguish between types, functions, exported things, and imported things when using dllimport/export semantics. Especially during the DLL build.

But if we don't need to support that, good riddance.



================
Comment at: libcxx/include/__config:535
 #    else
 #      define _LIBCPP_DLL_VIS __declspec(dllimport)
 #      define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS
----------------
This dead code show why the multiple macros were needed. Though it seems like this code has been broken since these large refactoring started.

They're also more important during the DLL build than when using the DLL. When you're using the DLL, they all get defined the same. When you're building the DLL, things are a lot trickier.

We should be clear that we've dropped support for a DLL build on Windows.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152652/new/

https://reviews.llvm.org/D152652



More information about the libcxx-commits mailing list