Skip to content

fix: remove -stdlib=libc++ from setup helpers, not needed on modern Pythons #4639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pybind11/setup_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
self.cxx_std = cxx_std

cflags = []
ldflags = []
if WIN:
cflags += ["/EHsc", "/bigobj"]
else:
Expand All @@ -154,11 +153,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
c_cpp_flags = shlex.split(env_cflags) + shlex.split(env_cppflags)
if not any(opt.startswith("-g") for opt in c_cpp_flags):
cflags += ["-g0"]
if MACOS:
cflags += ["-stdlib=libc++"]
ldflags += ["-stdlib=libc++"]
self._add_cflags(cflags)
self._add_ldflags(ldflags)

@property
def cxx_std(self) -> int:
Expand Down