File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 5454#endif
5555
5656#ifndef PYBIND11_BUILD_ABI
57- # if defined(__GXX_ABI_VERSION ) // Linux/OSX.
58- # define PYBIND11_BUILD_ABI "_cxxabi" PYBIND11_PLATFORM_ABI_ID_TOSTRING(__GXX_ABI_VERSION)
59- # elif defined(_MSC_VER ) // See PR #4953.
57+ # if defined(_MSC_VER ) // See PR #4953.
6058# if defined(_MT ) && defined(_DLL ) // Corresponding to CL command line options /MD or /MDd.
6159# if (_MSC_VER ) / 100 == 19
6260# define PYBIND11_BUILD_ABI "_md_mscver19"
7270# error "Unknown major version for MSC_VER: PLEASE REVISE THIS CODE."
7371# endif
7472# endif
75- # elif defined(__NVCOMPILER ) // NVHPC (PGI-based).
76- # define PYBIND11_BUILD_ABI "" // TODO: What should be here, to prevent UB?
73+ # elif defined(__NVCOMPILER ) // NVHPC (PGI-based).
74+ # define PYBIND11_BUILD_ABI "" // TODO: What should be here, to prevent UB?
75+ # elif defined(_LIBCPP_ABI_VERSION ) // https://libcxx.llvm.org/DesignDocs/ABIVersioning.html
76+ # define PYBIND11_BUILD_ABI "_libcpp" PYBIND11_PLATFORM_ABI_ID_TOSTRING(_LIBCPP_ABI_VERSION)
77+ # elif defined(__GXX_ABI_VERSION )
78+ # if __GXX_ABI_VERSION >= 1002 && defined(_GLIBCXX_USE_CXX11_ABI )
79+ # define PYBIND11_BUILD_ABI \
80+ "_usecxx11" PYBIND11_PLATFORM_ABI_ID_TOSTRING(_GLIBCXX_USE_CXX11_ABI)
81+ # else
82+ # error "Unknown platform or compiler (__GXX_ABI_VERSION): PLEASE REVISE THIS CODE."
83+ # endif
7784# else
7885# error "Unknown platform or compiler: PLEASE REVISE THIS CODE."
7986# endif
You can’t perform that action at this time.
0 commit comments