Skip to content

Commit 0119ae8

Browse files
committed
perf: Speedup root_relative_path
1 parent 01c27aa commit 0119ae8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cc/common/cc_helper_internal.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def root_relative_path(file):
354354
(str) The root-relative path of the file.
355355
"""
356356
if not file.is_source:
357-
return paths.relativize(file.path, file.root.path)
357+
return file.path[len(file.root.path) + 1:]
358358
short_path = file.short_path
359359
if not short_path.startswith("../"):
360360
return short_path

0 commit comments

Comments
 (0)