From 3b9280877e1de06cf82ef3de461c665bf7a8be19 Mon Sep 17 00:00:00 2001 From: jwbee Date: Fri, 21 Feb 2025 09:13:13 -0800 Subject: [PATCH] Remove %workspace% before checking path The paths checked by `_is_hermetic_or_exists` may begin with "%workspace%" which prevents the check for the path existing. In that case, the system module map may contain include paths that don't exist. In turn that can cause warnings for any target using layering check (notably Abseil). --- toolchain/internal/configure.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchain/internal/configure.bzl b/toolchain/internal/configure.bzl index acc5135e..ec2bb3bc 100644 --- a/toolchain/internal/configure.bzl +++ b/toolchain/internal/configure.bzl @@ -615,6 +615,7 @@ native_binary( def _is_hermetic_or_exists(rctx, path, sysroot_path): path = path.replace("%sysroot%", sysroot_path).replace("//", "/") + path = path.removeprefix("%workspace%") if not path.startswith("/"): return True return rctx.path(path).exists