fix(cgo): Handle headers in external repositories from cc_imports#4583
fix(cgo): Handle headers in external repositories from cc_imports#4583blorente wants to merge 2 commits intobazel-contrib:masterfrom
Conversation
a038f38 to
e5b0c15
Compare
e5b0c15 to
92676bf
Compare
| pure = "on", | ||
| ) | ||
|
|
||
| go_bazel_test( |
There was a problem hiding this comment.
I'm happy to move this somewhere else, but I'm not quite sure where the best place would be. Any suggestions?
|
@keith Do you see a less manual way to produce the correct paths? |
|
fwiw i fixed the cc_import not resolving includes like cc_library in bazel 9.x bazelbuild/bazel@d948e4d |
|
@keith that is so cool! I think that change makes this one unnecessary for Bazel 9.x because the external includes will be resolved correctly. Since it's also in However, that would mean bumping the |
|
No, we usually just bump dependencies when a feature in them could be useful. |
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
When depending on
cc_importtargets from external repositories, theirincludesattribute doesn't get resolved to execroot-relative paths. This means that we end up having-Imy/includes/dirinstead of-Iexternal/external_repo_name/my/includes/dir, which leads to missing headers during compilation.As a consequence, the
-devpackages generated byrules_distrolesswere not being imported correctly, and we had to manually insert-isystemflags with canonical repository names.Which issues(s) does this PR fix?
Fixes #
Other notes for review
This PR doesn't really depend on #4574, but both are needed for the project I'm working on and I'd rather that one merges first if possible, as it doesn't have a workaround.