Skip to content

Support for cc_toolchain enironment variables - #8400

Merged
LeFrosch merged 5 commits into
bazelbuild:masterfrom
LeFrosch:pull/e96345ace0ad7cfd3b1608fa47dee82696040dff
Jul 24, 2026
Merged

Support for cc_toolchain enironment variables#8400
LeFrosch merged 5 commits into
bazelbuild:masterfrom
LeFrosch:pull/e96345ace0ad7cfd3b1608fa47dee82696040dff

Conversation

@LeFrosch

Copy link
Copy Markdown
Collaborator

Correctly forward environment variables collect by the aspect to the CidrToolEnvironment. Also expand any /proc/self/cwd references.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for resolving /proc/self/cwd paths to absolute paths within the Bazel execution root, adding an EnvironmentProcessor extension point and a ProcSelfCwdEnvironmentProcessor implementation to handle toolchain environment variables. It also updates path resolution logic in ExecutionRootPath, CoptsIncludeProcessor, and CoptsSysrootProcessor. The review feedback highlights several critical issues, including a missing break statement in a switch block in BlazeConfigurationToolchainResolver, broken unit tests in ProcSelfCwdEnvironmentProcessorTest that attempt to modify an ImmutableMap in-place, potential NullPointerExceptions in ProcSelfCwdEnvironmentProcessor and CoptsSysrootProcessor due to unchecked path resolution, a loss of environment variable insertion order in EnvironmentProcessor, and a missing null check in ExecutionRootPath.tryCreate.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread cpp/src/com/google/idea/blaze/cpp/copts/CoptsSysrootProcessor.kt Outdated
Comment thread cpp/src/com/google/idea/blaze/cpp/environment/EnvironmentProcessor.java Outdated
Comment thread base/src/com/google/idea/blaze/base/model/primitives/ExecutionRootPath.java Outdated
@LeFrosch
LeFrosch force-pushed the pull/e96345ace0ad7cfd3b1608fa47dee82696040dff branch from 29eae20 to ce3012d Compare July 15, 2026 17:05
@LeFrosch LeFrosch mentioned this pull request Jul 16, 2026
@LeFrosch
LeFrosch force-pushed the pull/e96345ace0ad7cfd3b1608fa47dee82696040dff branch from 2fb57d3 to e5554dc Compare July 22, 2026 09:43
@LeFrosch
LeFrosch marked this pull request as ready for review July 23, 2026 08:16
@LeFrosch
LeFrosch requested review from mai93 and ujohnny as code owners July 23, 2026 08:16
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Jul 23, 2026
LeFrosch added 5 commits July 24, 2026 11:39
# Conflicts:
#	cpp/src/com/google/idea/blaze/cpp/BlazeConfigurationToolchainResolver.java
# Conflicts:
#	MODULE.bazel
#	MODULE.bazel.lock
@LeFrosch
LeFrosch force-pushed the pull/e96345ace0ad7cfd3b1608fa47dee82696040dff branch from e5554dc to 84f85cb Compare July 24, 2026 09:41
@LeFrosch
LeFrosch merged commit 03f340e into bazelbuild:master Jul 24, 2026
4 checks passed
@LeFrosch
LeFrosch deleted the pull/e96345ace0ad7cfd3b1608fa47dee82696040dff branch July 24, 2026 11:44
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in Bazel IntelliJ Plugin Jul 24, 2026
@github-actions github-actions Bot removed the awaiting-review Awaiting review from Bazel team on PRs label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin

Projects

Development

Successfully merging this pull request may close these issues.

2 participants