Skip to content

Automatically add supports-path-mapping where applicable - #803

Open
keith wants to merge 3 commits into
bazelbuild:mainfrom
keith:ks/automatically-add-supports-path-mapping-where-applicable
Open

Automatically add supports-path-mapping where applicable#803
keith wants to merge 3 commits into
bazelbuild:mainfrom
keith:ks/automatically-add-supports-path-mapping-where-applicable

Conversation

@keith

@keith keith commented Jul 27, 2026

Copy link
Copy Markdown
Member

This way users don't have to pass:

--modify_execution_info=CppCompile=+supports-path-mapping,CppModuleMap=+supports-path-mapping,CppArchive=+supports-path-mapping

or know which mnemonics support it. This still does nothing unless the
overall path stripping feature is enabled

keith added 3 commits July 27, 2026 15:19
This way users don't have to pass:

```
--modify_execution_info=CppCompile=+supports-path-mapping,CppModuleMap=+supports-path-mapping,CppArchive=+supports-path-mapping
```

or know which mnemonics support it. This still does nothing unless the
overall path stripping feature is enabled
@keith
keith marked this pull request as ready for review July 27, 2026 22:42
@keith
keith requested review from c-mita, pzembrod and trybka as code owners July 27, 2026 22:42
@lilygorsheneva

Copy link
Copy Markdown
Collaborator

I think we need a feature flag for this, based on our findings with CppLink there's probably toolchains that break with it.

@keith

keith commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

what's an example of a toolchain specific breakage?

@trybka

trybka commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

I thought your finding was that this broke on apple?

When targeting macOS the debug info paths stored in the binaries are
invalid, since they encode the literal bazel-out/cfg

@keith

keith commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

that's only a problem with CppLink

@lilygorsheneva

Copy link
Copy Markdown
Collaborator

To clarify my previous statement:
We've had to fix at least 5 internal toolchains to support CppLink (in addition to the apple debug info paths which aren't fixed); I can't imagine CppCompile being free of such issues (in addition to the generated file issues we discussed at our last meeting).

@keith

keith commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

are you enabling this globally with --modify_execution_info today? i imagine there's a lot more value in flipping that for CppCompile than for CppLink, since there are a lot more potential actions to dedup. Also note this PR isn't doing CppCompile because that has to be done in java still bazelbuild/bazel#30485

@lilygorsheneva

Copy link
Copy Markdown
Collaborator

CppCompile and CppModuleMap (at least internally, maybe their behavior diverges externally) also need to share the same modify_execution_info state.

@lilygorsheneva

Copy link
Copy Markdown
Collaborator

More accurately, most of my testing had --modify_execution_info='CppCompile|CppModuleMap|CppCompileHeader=+supports-path-mapping'

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

Successfully merging this pull request may close these issues.

3 participants