fix: don't force -fvisibility=hidden on Windows (#5757)

Fix https://github.com/pybind/pybind11/discussions/5750
This commit is contained in:
moi15moi
2025-07-18 12:51:33 -04:00
committed by GitHub
parent c4ee83c498
commit 316273efc8

View File

@@ -74,7 +74,7 @@
// requires forcing hidden visibility on pybind code, so we enforce this by setting the attribute
// on the main `pybind11` namespace.
#if !defined(PYBIND11_NAMESPACE)
# ifdef __GNUG__
# if defined(__GNUG__) && !defined(_WIN32)
# define PYBIND11_NAMESPACE pybind11 __attribute__((visibility("hidden")))
# else
# define PYBIND11_NAMESPACE pybind11