rules_ocaml icon indicating copy to clipboard operation
rules_ocaml copied to clipboard

revise CcInfo handling

Open mobileink opened this issue 9 months ago • 0 comments

Currently if an Obazl module depends on a cc lib, it is propagated as a CcInfo provider. This turns out to be the wrong strategy, because it makes OCaml targets look like CcInfo producers, directly consumable by rules_cc rules.

The better strategy is to wrap CcInfos in an OCamlCcInfo provider, as suggested by Implementing Starlark rules that depend on C++ rules and/or that C++ rules can depend on.

Enhancement: do add CcInfo provider to the output of ocaml_binary with -output-obj or -output-complete-obj, so that they can be used as deps of cc rules.

mobileink avatar Mar 08 '25 12:03 mobileink