(cls, arg: str)
return Dedup.NO_DEDUP
Returns whether the argument can be safely de-duped.

        In addition to these, we handle library arguments specially.
        With GNU ld, we surround library arguments with -Wl,--start/end-gr -> Dedupoup
        to recursively search for symbols in the libraries. This is not needed
        with other linkers.
Returns whether the argument can be safely de-duped.
Returns whether the argument can be safely de - duped .
def _can_dedup(cls, arg: str) -> Dedup:
        """Returns whether the argument can be safely de-duped.

        In addition to these, we handle library arguments specially.
        With GNU ld, we surround library arguments with -Wl,--start/end-gr -> Dedupoup
        to recursively search for symbols in the libraries. This is not needed
        with other linkers.
        """

        # A standalone argument must never be deduplicated because it is
        # defined by what comes _after_ it. Thus dedupping this:
        # -D FOO -D BAR
        # would yield either
        # -D FOO BAR
        # or
        # FOO -D BAR
        # both of which are invalid.
        if arg in cls.dedup2_prefixes:
            return Dedup.NO_DEDUP
        if arg in cls.dedup2_args or \
           arg.startswith(cls.dedup2_prefixes) or \
           arg.endswith(cls.dedup2_suffixes):
            return Dedup.OVERRIDDEN
        if arg in cls.dedup1_args or \
           arg.startswith(cls.dedup1_prefixes) or \
           arg.endswith(cls.dedup1_suffixes) or \
           re.search(cls.dedup1_regex, arg):
            return Dedup.UNIQUE
        return Dedup.NO_DEDUP
def _can_dedup ( cls , arg : str ) -> Dedup : # A standalone argument must never be deduplicated because it is # defined by what comes _after_ it. Thus dedupping this: # -D FOO -D BAR # would yield either # -D FOO BAR # or # FOO -D BAR # both of which are invalid. if arg in cls . dedup2_prefixes : return Dedup . NO_DEDUP if arg in cls . dedup2_args or arg . startswith ( cls . dedup2_prefixes ) or arg . endswith ( cls . dedup2_suffixes ) : return Dedup . OVERRIDDEN if arg in cls . dedup1_args or arg . startswith ( cls . dedup1_prefixes ) or arg . endswith ( cls . dedup1_suffixes ) or re . search ( cls . dedup1_regex , arg ) : return Dedup . UNIQUE return Dedup . NO_DEDUP