Skip to content

Conversation

@fmeum
Copy link
Collaborator

@fmeum fmeum commented Jun 24, 2024

Basic support for path mapping for CppCompile actions is added by wiring up PathMapper with:

  • structured path variables for files and include paths (Artifact and NestedSet<PathFragment>)
  • inputs/outputs via Spawn#getPathMapper()
  • header discovery

Also turns external_include_paths into a structured variable, which was missed in #22463.

The following features are known to be unsupported for now:

  • layering_check (requires rewriting paths to and in module maps)
  • source tree artifacts (requires wiring up PathMapper in CppCompileActionTemplate)
  • location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in user_compile_flags)

These limitations will be lifted in follow-up PRs.

Work towards #6526

RELNOTES: Experimental support for path mapping CppCompile actions can be enabled via --modify_execution_info=CppCompile=+supports-path-mapping.

Closes #22445.

PiperOrigin-RevId: 646109274
Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693

Closes #22875

@fmeum fmeum requested a review from a team as a code owner June 24, 2024 18:14
@fmeum fmeum changed the title Add basic C++ path mapping support [7.3.0] Add basic C++ path mapping support Jun 24, 2024
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-Performance Issues for Performance teams team-Rules-CPP Issues for C++ rules labels Jun 24, 2024
@iancha1992 iancha1992 enabled auto-merge June 24, 2024 18:15
@iancha1992 iancha1992 requested a review from comius June 24, 2024 18:16
auto-merge was automatically disabled June 24, 2024 20:44

Head branch was pushed to by a user without write access

Basic support for path mapping for `CppCompile` actions is added by wiring up `PathMapper` with:
* structured path variables for files and include paths (`Artifact` and `NestedSet<PathFragment>`)
* inputs/outputs via `Spawn#getPathMapper()`
* header discovery

Also turns `external_include_paths` into a structured variable, which was missed in bazelbuild#22463.

The following features are known to be unsupported for now:
* `layering_check` (requires rewriting paths to and in module maps)
* source tree artifacts (requires wiring up `PathMapper` in `CppCompileActionTemplate`)
* location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in `user_compile_flags`)

These limitations will be lifted in follow-up PRs.

Work towards bazelbuild#6526

RELNOTES: Experimental support for path mapping `CppCompile` actions can be enabled via `--modify_execution_info=CppCompile=+supports-path-mapping`.

Closes bazelbuild#22445.

PiperOrigin-RevId: 646109274
Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693
@iancha1992 iancha1992 enabled auto-merge June 24, 2024 20:47
@iancha1992 iancha1992 added this pull request to the merge queue Jul 10, 2024
Merged via the queue into bazelbuild:release-7.3.0 with commit 1debf67 Jul 10, 2024
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jul 10, 2024
@fmeum fmeum deleted the release-7.3.0 branch July 18, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Performance Issues for Performance teams team-Rules-CPP Issues for C++ rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants