Skip to content

Commit

Permalink
Error if _GLIBCXX_USE_CXX11_ABI is not defined
Browse files Browse the repository at this point in the history
Within the `__GXX_ABI_VERSION` block this should always be defined,
guard against unexpected defines and make the error obvious.
  • Loading branch information
cryos committed Nov 21, 2024
1 parent 476c322 commit 271720f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/pybind11/conduit/pybind11_platform_abi_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@
# 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 \
&& defined(_GLIBCXX_USE_CXX11_ABI)
# 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
Expand Down

0 comments on commit 271720f

Please sign in to comment.