rules_foreign_cc icon indicating copy to clipboard operation
rules_foreign_cc copied to clipboard

Introduce out_pc_dir attribute to expose pkgconfig files

Open JSGette opened this issue 3 months ago • 0 comments

Whilst working on migrating https://github.com/DataDog/datadog-agent to bazel we currently have to maintain a hybrid approach and use several build systems simultaneously. We use rules_foreign_cc to build openssl that is then used as a dependency to build xmlsec that requires presence of .pc files to pick up includes and shared libraries properly. This PR introduces a new attribute out_pc_dir for configure_make rule in order to expose a new output group to make pkgconfig files available. It works exactly the same way as in case of out_include_dir except the default value isn't set and the attribute is optional

Example usage can be found here: https://github.com/DataDog/datadog-agent/pull/42930/files#diff-f3181df6a22b232f1fd24950e2b261f083553ea0b4006233952d6efc9916ec1c

I have validated functionality of configure_make rule by running multiple builds with and without out_pc_dir attribute set.

JSGette avatar Nov 18 '25 09:11 JSGette