Skip to content

Commit

Permalink
correct overeager slash conversion on windows (bazel-contrib#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
novas0x2a authored Nov 1, 2024
1 parent d03f7ae commit 77d4483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion foreign_cc/private/cc_toolchain_util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 77d4483

Please sign in to comment.