Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.3.0] Add basic C++ path mapping support #22875

Closed
bazel-io opened this issue Jun 24, 2024 · 2 comments
Closed

[7.3.0] Add basic C++ path mapping support #22875

bazel-io opened this issue Jun 24, 2024 · 2 comments

Comments

@bazel-io
Copy link
Member

Forked from #22445

@bazel-io
Copy link
Member Author

Cherry-pick was attempted but there were merge conflicts in the following file(s). Please resolve manually.

src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java
src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainVariables.java
src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionTemplate.java
src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
src/test/java/com/google/devtools/build/lib/exec/util/SpawnBuilder.java
src/test/java/com/google/devtools/build/lib/rules/cpp/LibraryToLinkValueTest.java
src/test/java/com/google/devtools/build/lib/rules/cpp/StarlarkCcCommonTest.java

cc: @bazelbuild/triage

@iancha1992
Copy link
Member

iancha1992 commented Jun 24, 2024

Cherry-picked in #22876 by @fmeum

github-merge-queue bot pushed a commit that referenced this issue Jul 10, 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

Co-authored-by: Yun Peng <pcloudy@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants