diff --git a/pybind11/setup_helpers.py b/pybind11/setup_helpers.py index ced8542e6..f2aee2e7c 100644 --- a/pybind11/setup_helpers.py +++ b/pybind11/setup_helpers.py @@ -99,7 +99,7 @@ class Pybind11Extension(_Extension): def _add_lflags(self, *flags): for flag in flags: - if flag not in self.extra_compile_args: + if flag not in self.extra_link_args: self.extra_link_args.append(flag) def __init__(self, *args, **kwargs):