On Windows tests that use _LIBCPP_ASSERT fail to link because the assertion handler function isn't correctly exported from the libc++ dylib. This patch fixes the dll import/export issues by introducing a new visibility macro _LIBCPP_EXTERN_VIS for use on external variables.
Details
Details
- Reviewers
compnerd EricWF smeenai - Commits
- rGfc26379a843a: [libc++] Introduce _LIBCPP_EXTERN_VIS to fix __libcpp_debug_function link errors
rCXX292158: [libc++] Introduce _LIBCPP_EXTERN_VIS to fix __libcpp_debug_function link errors
rL292158: [libc++] Introduce _LIBCPP_EXTERN_VIS to fix __libcpp_debug_function link errors
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This will need to be exported on other platforms too when hidden visibility happens :)
Is it okay for these to be exported unconditionally, or should their exporting be determined by _LIBCPP_DEBUG? This LGTM if it's the former.
Comment Actions
Are you sure?I don't think "extern" variables are subject to visibility rules in GCC or Clang. At least I haven't
been able to generate a test case or even different assembly.
Is it okay for these to be exported unconditionally, or should their exporting be determined by _LIBCPP_DEBUG? This LGTM if it's the former.
Unconditionally. The declaration should already be #ifdef'ed out when libc++'s debug mode is not enabled.
I'm going to commit this as-is, and will address visibility issues on other platforms if needed.