Remove ocamlpool symbols from ocaml_ffi_mock
commit5a5decce1636086bfb90fda49a5b13b0c750cb2e
authorJake Bailey <jakebailey@meta.com>
Wed, 23 Nov 2022 21:17:32 +0000 (23 13:17 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 23 Nov 2022 21:17:32 +0000 (23 13:17 -0800)
treeb02f26bb8d1c1fffe126713f8dedbadb852af766
parentb428d44fb2be25ebbd6a6101c42741dc3ac7bae7
Remove ocamlpool symbols from ocaml_ffi_mock

Summary:
The ocaml_ffi_mock C library stubs out the parts of the OCaml runtime that we interface with. Its purpose is to allow test binaries to be built for Rust libraries which need to link to the OCaml runtime in production use cases, but do not exercise OCaml runtime functionality in their unit tests.

Since D41417103 (https://github.com/facebook/hhvm/commit/84dc8ab7502def3e67d151aa0aafb8b924e9f410), targets which link to ocamlrep_ocamlpool will get the real ocamlpool symbol definitions, so attempting to include them in this mock results in linker errors (duplicate symbols). We can mock out only the ocaml runtime symbols instead.

Reviewed By: williewillus

Differential Revision: D41501467

fbshipit-source-id: c04c207e9bfd3b51956ddcccc6ec07584bce75a0
hphp/hack/src/utils/ocaml_ffi_mock/ocaml.c