Skip to content

Conversation

meteorcloudy
Copy link
Member

Fixes #18683

Related: protocolbuffers/protobuf#20085

This change is a rework of #26005 to enable short virtual includes based on a cc feature, therefore we can limit the change to only MSVC compiler on Windows.

RELNOTES: If a cc toolchain feature named shorten_virtual_includes is enabled, virtual include header files are linked under bin/_virtual_includes/<hash of target path> instead of bin/<target package path>/_virtual_includes/<target name>. This shortens the virtual include paths which is critical for mitigating long path issue with MSVC on Windows.

Closes #26528.

PiperOrigin-RevId: 781975309
Change-Id: Ia573a5f25707ad2462aa3a4459fc66db1779df36

pzembrod and others added 2 commits July 11, 2025 15:25
…bzl to cc_helper_internal.bzl

PiperOrigin-RevId: 759147398
Change-Id: I5f1f3e4ee9f76a2de8768f49163e3103993d3c0b
Fixes bazelbuild#18683

Related: protocolbuffers/protobuf#20085

This change is a rework of bazelbuild#26005 to enable short virtual includes based on a cc feature, therefore we can limit the change to only MSVC compiler on Windows.

RELNOTES: If a cc toolchain feature named `shorten_virtual_includes` is enabled, virtual include header files are linked under `bin/_virtual_includes/<hash of target path>` instead of `bin/<target package path>/_virtual_includes/<target name>`. This shortens the virtual include paths which is critical for mitigating long path issue with MSVC on Windows.

Closes bazelbuild#26528.

PiperOrigin-RevId: 781975309
Change-Id: Ia573a5f25707ad2462aa3a4459fc66db1779df36
@meteorcloudy meteorcloudy requested a review from a team as a code owner July 11, 2025 15:27
@github-actions github-actions bot added team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Jul 11, 2025
@meteorcloudy meteorcloudy enabled auto-merge July 11, 2025 15:27
@iancha1992 iancha1992 added this to the 8.4.0 release blockers milestone Jul 11, 2025
PiperOrigin-RevId: 782002621
Change-Id: I8634c95c51e2325d12fa4e200708f1701c66193d
@meteorcloudy meteorcloudy added this pull request to the merge queue Jul 11, 2025
Merged via the queue into bazelbuild:release-8.4.0 with commit 26216ac Jul 11, 2025
46 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants