File tree 1 file changed +12
-5
lines changed
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 54
54
#endif
55
55
56
56
#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.
60
58
# if defined(_MT ) && defined(_DLL ) // Corresponding to CL command line options /MD or /MDd.
61
59
# if (_MSC_VER ) / 100 == 19
62
60
# define PYBIND11_BUILD_ABI "_md_mscver19"
72
70
# error "Unknown major version for MSC_VER: PLEASE REVISE THIS CODE."
73
71
# endif
74
72
# 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
77
84
# else
78
85
# error "Unknown platform or compiler: PLEASE REVISE THIS CODE."
79
86
# endif
You can’t perform that action at this time.
0 commit comments