Update cc_toolchain_util.bzl

This commit is contained in:
kekxv 2023-12-23 16:54:26 +08:00 committed by GitHub
parent 0593880824
commit bb359ec063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -379,6 +379,8 @@ def _prefix(text, from_str, prefix):
(before, middle, after) = text.partition(from_str)
if not middle or before.endswith("/"):
return text
if before.startswith("--"):
return before + prefix + middle + after
return prefix + before + middle + after
def _file_name_no_ext(basename):