Skip to content

Commit

Permalink
Isolate potentially ABI-compatible MSVC builds
Browse files Browse the repository at this point in the history
See pybind11 issue pybind/pybind11#4779
  • Loading branch information
wjakob committed Aug 23, 2023
1 parent 5888e8a commit c7f3cd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nb_internals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@
#endif

/// On Linux/OSX, changes in __GXX_ABI_VERSION__ indicate ABI incompatibility.
/// Also keep potentially ABI-incompatible visual studio builds apart.
#if defined(__GXX_ABI_VERSION)
# define NB_BUILD_ABI "_cxxabi" NB_TOSTRING(__GXX_ABI_VERSION)
#elif defined(_MSC_VER)
# define NB_BUILD_ABI "_mscver" NB_TOSTRING(_MSC_VER)
#else
# define NB_BUILD_ABI ""
#endif
Expand Down

0 comments on commit c7f3cd6

Please sign in to comment.