Skip to content

Commit 64d1009

Browse files
committed
Make virtual include paths shorter
1 parent 2780393 commit 64d1009

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/starlark/builtins_bzl/common/cc/compile/cc_compilation_helper.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ load(":common/paths.bzl", "paths")
2121

2222
cc_internal = _builtins.internal.cc_internal
2323

24-
_VIRTUAL_INCLUDES_DIR = "_virtual_includes"
24+
_VIRTUAL_INCLUDES_DIR = "_v_inc"
2525

2626
def _include_dir(directory, repo_path, sibling_repo_layout):
2727
if sibling_repo_layout:
@@ -107,7 +107,7 @@ def _compute_public_headers(
107107

108108
module_map_headers = []
109109
virtual_to_original_headers_list = []
110-
virtual_include_dir = paths.join(paths.join(cc_helper.package_source_root(label.workspace_name, label.package, is_sibling_repository_layout), _VIRTUAL_INCLUDES_DIR), label.name)
110+
virtual_include_dir = paths.join(_VIRTUAL_INCLUDES_DIR, "%x" % hash(paths.join(cc_helper.package_source_root(label.workspace_name, label.package, is_sibling_repository_layout), label.name)))
111111
for original_header in public_headers_artifacts:
112112
repo_relative_path = _repo_relative_path(original_header)
113113
if not repo_relative_path.startswith(strip_prefix):

0 commit comments

Comments
 (0)