Skip to content

Commit ca9e699

Browse files
committed
Apply suggestion by @isuruf, with revised comments (code is as suggested).
1 parent e071edc commit ca9e699

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

include/pybind11/conduit/pybind11_platform_abi_id.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@
2323
# define PYBIND11_COMPILER_TYPE "gcc_cygwin"
2424
# elif defined(_MSC_VER)
2525
# define PYBIND11_COMPILER_TYPE "msvc"
26-
# elif defined(__INTEL_COMPILER) || defined(__clang__) || defined(__GNUC__)
27-
# define PYBIND11_COMPILER_TYPE "system" // Assumed compatible with system compiler.
26+
# elif defined(__GLIBC__) \
27+
&& (defined(__INTEL_COMPILER) || defined(__clang__) || defined(__GNUC__))
28+
// // Compatibility is determined based on libstdc++ or libc++ ABI version (below).
29+
# define PYBIND11_COMPILER_TYPE "glibc"
30+
# elif defined(__APPLE__) \
31+
&& (defined(__INTEL_COMPILER) || defined(__clang__) || defined(__GNUC__))
32+
// // Compatibility is (usually) determined based on libc++ ABI version (below).
33+
# define PYBIND11_COMPILER_TYPE "macos"
2834
# else
2935
# error "Unknown PYBIND11_COMPILER_TYPE: PLEASE REVISE THIS CODE."
3036
# endif

0 commit comments

Comments
 (0)