[llvm] [bazel] Fix remote exec with thin docker images (PR #205849)
Keith Smiley via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 08:53:26 PDT 2026
https://github.com/keith created https://github.com/llvm/llvm-project/pull/205849
rules_python is working on flipping this default but without this
setting /usr/bin/python3 must exist to run a py_binary. This might not
be the case in remote exec environments where you're trying to use the
smallest possible image.
>From ea8c6dbb595164b4582438e438d6ceac022f6826 Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Thu, 25 Jun 2026 08:51:58 -0700
Subject: [PATCH] [bazel] Fix remote exec with thin docker images
rules_python is working on flipping this default but without this
setting /usr/bin/python3 must exist to run a py_binary. This might not
be the case in remote exec environments where you're trying to use the
smallest possible image.
---
utils/bazel/.bazelrc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/utils/bazel/.bazelrc b/utils/bazel/.bazelrc
index bad694419d334..dea659a63533b 100644
--- a/utils/bazel/.bazelrc
+++ b/utils/bazel/.bazelrc
@@ -21,6 +21,9 @@ build --guard_against_concurrent_changes
# Automatically enable --config=(linux|macos|windows) based on the host
build --enable_platform_specific_config
+# Don't require a system python to run py_binary targets
+common -- at rules_python//python/config_settings:bootstrap_impl=script
+
# In opt mode, bazel by default builds both PIC and non-PIC object files for
# tests vs binaries. We don't need this feature and it slows down opt builds
# considerably.
More information about the llvm-commits
mailing list