From 01453b05c49a5796fa87d7c1d90931b33beb42a4 Mon Sep 17 00:00:00 2001 From: Jay Soffian <155970+jaysoffian@users.noreply.github.com> Date: Tue, 13 Oct 2020 18:20:10 -0400 Subject: [PATCH] fix (setup_helpers): fix bug in _add_lflags (#2586) Fix minor bug in `_add_lflags` that allows a flag to be added more than once. --- pybind11/setup_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):