Fix build on macOS after upgrade to tezos-rust-libs 1.4
Context
Building on macOS is broken with the migration of tezos-rust-libs
from 1.3 to 1.4.
After a lot of debugging and many attempts, @dannywillems noticed that adding -ccopt "-framework Security"
at link time resolves the problem.
This MR does this by:
- modifying the root dune file to add a new target:
(rule
(target macos-link-flags.sexp)
(action (with-stdout-to %{target}
(system "[ '%{system}' = 'macosx' ] && echo '(-ccopt \"-framework Security\")' || echo '()'"))
)
)
- modifying manifest/manifest.ml to systematically include a line
(:include %{workspace_root}/macos-link-flags.sexp)
inlink_flags
section.
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Mohamed IGUERNLALA