This commit is contained in:
Ralf W. Grosse-Kunstleve 2024-11-20 20:11:39 -05:00 committed by GitHub
commit f5eb064544
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,9 +54,7 @@
#endif #endif
#ifndef PYBIND11_BUILD_ABI #ifndef PYBIND11_BUILD_ABI
# if defined(__GXX_ABI_VERSION) // Linux/OSX. # if defined(_MSC_VER) // See PR #4953.
# define PYBIND11_BUILD_ABI "_cxxabi" PYBIND11_PLATFORM_ABI_ID_TOSTRING(__GXX_ABI_VERSION)
# elif defined(_MSC_VER) // See PR #4953.
# if defined(_MT) && defined(_DLL) // Corresponding to CL command line options /MD or /MDd. # if defined(_MT) && defined(_DLL) // Corresponding to CL command line options /MD or /MDd.
# if (_MSC_VER) / 100 == 19 # if (_MSC_VER) / 100 == 19
# define PYBIND11_BUILD_ABI "_md_mscver19" # define PYBIND11_BUILD_ABI "_md_mscver19"
@ -72,8 +70,20 @@
# error "Unknown major version for MSC_VER: PLEASE REVISE THIS CODE." # error "Unknown major version for MSC_VER: PLEASE REVISE THIS CODE."
# endif # endif
# endif # endif
# elif defined(__NVCOMPILER) // NVHPC (PGI-based). # elif defined(__NVCOMPILER) // NVHPC (PGI-based).
# define PYBIND11_BUILD_ABI "" // TODO: What should be here, to prevent UB? # define PYBIND11_BUILD_ABI "" // TODO: What should be here, to prevent UB?
# elif defined(_LIBCPP_ABI_VERSION) // https://libcxx.llvm.org/DesignDocs/ABIVersioning.html
# define PYBIND11_BUILD_ABI "_abi" PYBIND11_PLATFORM_ABI_ID_TOSTRING(_LIBCPP_ABI_VERSION)
# elif defined(__GXX_ABI_VERSION)
# if __GXX_ABI_VERSION >= 1002 && __GXX_ABI_VERSION < 2000
# if !defined(_GLIBCXX_USE_CXX11_ABI)
# error "UNEXPECTED: _GLIBCXX_USE_CXX11_ABI not defined"
# endif
# define PYBIND11_BUILD_ABI \
"_gxx_abi_1xxx_usecxx11_" PYBIND11_PLATFORM_ABI_ID_TOSTRING(_GLIBCXX_USE_CXX11_ABI)
# else
# error "Unknown platform or compiler (__GXX_ABI_VERSION): PLEASE REVISE THIS CODE."
# endif
# else # else
# error "Unknown platform or compiler: PLEASE REVISE THIS CODE." # error "Unknown platform or compiler: PLEASE REVISE THIS CODE."
# endif # endif