From c7f3cd6a7023dec55c63b995ba50c9f5d4b9147a Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Tue, 15 Aug 2023 14:23:27 +0200 Subject: [PATCH] Isolate potentially ABI-compatible MSVC builds See pybind11 issue https://github.com/pybind/pybind11/pull/4779 --- src/nb_internals.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nb_internals.cpp b/src/nb_internals.cpp index 7e3d4ff4..0dbdc63b 100644 --- a/src/nb_internals.cpp +++ b/src/nb_internals.cpp @@ -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