Do not link to caml_startup in ocaml_runtime
commitd50a0a30cc61a2fd91b7b5d6d0c8255595546b9a
authorJake Bailey <jakebailey@meta.com>
Thu, 9 Feb 2023 02:42:08 +0000 (8 18:42 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 9 Feb 2023 02:42:08 +0000 (8 18:42 -0800)
tree2aaf382cba37399bbd44dcfbb1496441ba685e74
parentea3f3c8c0aa5eb19b4f0965c48adeaae368622ea
Do not link to caml_startup in ocaml_runtime

Summary: It looks like ocaml_binary rules--at least in buck1 `mode/dev-cov`--do not define a symbol named `caml_startup`, so we get a link error in that mode when the `ocaml_runtime` crate (which defines a wrapper for `caml_startup`) is reachable. Only the `hh_distc` worker (which is not an ocaml_binary) actually needs to invoke `caml_startup`, so move the `caml_startup` wrapper into a new crate which is not reachable from any ocaml_binary rules.

Reviewed By: shayne-fletcher

Differential Revision: D43136131

fbshipit-source-id: 0dd68a30649d57afa03f6b7e9bea3420e55cb250
hphp/hack/src/utils/caml_startup/Cargo.toml [new file with mode: 0644]
hphp/hack/src/utils/caml_startup/caml_startup.rs [new file with mode: 0644]
hphp/hack/src/utils/ocaml_runtime/lib.rs