correct overeager slash conversion on windows (#1285)

This commit is contained in:
Mike Lundy 2024-11-01 16:21:35 -07:00 committed by GitHub
parent d03f7ae79d
commit 77d4483fad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ def _convert_flags(compiler, flags):
list: The converted flags
"""
if compiler == "msvc-cl":
return [flag.replace("/", "-") if flag.startswith("/") else flag for flag in flags]
return [("-" + flag.removeprefix("/")) if flag.startswith("/") else flag for flag in flags]
return flags
def _add_if_needed(arr, add_arr):