[libcxx-commits] [PATCH] D147638: [libcxxabi] [test] Fix the mingw test config

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 14 14:18:34 PDT 2023


mstorsjo added inline comments.


================
Comment at: libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in:6
 
+# Define _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS; when tests include
+# libcxxabi sources (some tests do #include "../src/<file>") we can't
----------------
ldionne wrote:
> Could we instead define it just in the tests that include libcxxabi source files? I don't think there is a lot of those.
There's a couple of them, and we could do that.

But secondly, we also need to define this for all tests that include cxxabi.h and call functions from there directly. cxxabi.h defaults to dllimport unless this define is set (libcxx has this machinery for customizing the defaults based on the build style etc, via the `__config` file etc, but libcxxabi doesn't have that). The default of dllimport doesn't work when we're statically linking libcxx+libcxxabi in the end. So even then, we need this defined in one way or another.

(I guess we could rework how the visibility attributes in cxxabi.h work too, but there's little benefit to that outside of the tests, as I don't believe regular user code ever would be including that header.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147638



More information about the libcxx-commits mailing list