[libcxx] [test] Don't use header defines for detecting linking against a DLL
In clang-cl/MSVC environments, linking against a DLL C++ standard library requires having dllimport attributes in the headers; this has been used for detecting whether the tests link against a DLL, by looking at the libc++ specific define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS. In mingw environments, thanks to slightly different code generation and a couple linker tricks, it's possible to link against a DLL C++ standard library without dllimport attributes. Therefore, don't rely on the libc++ specific header define for the detection. Replace the detection with a runtime test. Differential Revision: https://reviews.llvm.org/D125922
Loading
Please sign in to comment