Currently, there is merging of Cc infos performed here:
https://github.com/bazel-contrib/rules_foreign_cc/blob/main/foreign_cc/private/framework.bzl#L1237
This is incorrect, because the CcInfo of the output target does not contain any direct_public_headers, only headers. This is problematic for tools like depend-on-what-you-use (DWYU), which need targets to have direct_public_headers.
The correct implementation is:
return cc_common.merge_cc_infos(direct_cc_infos = [cc_info], cc_infos = [inputs_info])
Currently, there is merging of Cc infos performed here:
https://github.com/bazel-contrib/rules_foreign_cc/blob/main/foreign_cc/private/framework.bzl#L1237
This is incorrect, because the
CcInfoof the output target does not contain anydirect_public_headers, onlyheaders. This is problematic for tools like depend-on-what-you-use (DWYU), which need targets to havedirect_public_headers.The correct implementation is: