rules_ocaml
rules_ocaml copied to clipboard
revise CcInfo handling
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.