From ca9e6990deb9a57f21cba0879499600addeadf06 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 3 Dec 2024 10:47:55 -0800 Subject: [PATCH] Apply suggestion by @isuruf, with revised comments (code is as suggested). --- include/pybind11/conduit/pybind11_platform_abi_id.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/pybind11/conduit/pybind11_platform_abi_id.h b/include/pybind11/conduit/pybind11_platform_abi_id.h index 30c47750df..0c5a26b50c 100644 --- a/include/pybind11/conduit/pybind11_platform_abi_id.h +++ b/include/pybind11/conduit/pybind11_platform_abi_id.h @@ -23,8 +23,14 @@ # define PYBIND11_COMPILER_TYPE "gcc_cygwin" # elif defined(_MSC_VER) # define PYBIND11_COMPILER_TYPE "msvc" -# elif defined(__INTEL_COMPILER) || defined(__clang__) || defined(__GNUC__) -# define PYBIND11_COMPILER_TYPE "system" // Assumed compatible with system compiler. +# elif defined(__GLIBC__) \ + && (defined(__INTEL_COMPILER) || defined(__clang__) || defined(__GNUC__)) +// // Compatibility is determined based on libstdc++ or libc++ ABI version (below). +# define PYBIND11_COMPILER_TYPE "glibc" +# elif defined(__APPLE__) \ + && (defined(__INTEL_COMPILER) || defined(__clang__) || defined(__GNUC__)) +// // Compatibility is (usually) determined based on libc++ ABI version (below). +# define PYBIND11_COMPILER_TYPE "macos" # else # error "Unknown PYBIND11_COMPILER_TYPE: PLEASE REVISE THIS CODE." # endif