Skip to content

Incorrect merging of cc_infos in _define_out_cc_info (framework.bzl) #1576

Description

@carlosgalvezp

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])

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions