codekingpro/portable-devtools
114k
1from __future__ import annotations2 3from .py38 import removeprefix4 5 6def consolidate_linker_args(args: list[str]) -> str:7 """8 Ensure the return value is a string for backward compatibility.9 10 Retain until at least 2024-04-31. See pypa/distutils#24611 """12 13 if not all(arg.startswith('-Wl,') for arg in args):14 return args15 return '-Wl,' + ','.join(removeprefix(arg, '-Wl,') for arg in args)16 