Build: use O3 pervasively with release and static profiles
Context
The ocamlopt -O3 flag is currently used only for binaries, but if we care about performances, it should be applied everywhere.
One cannot set env only in the toplevel dune file because dune-project files prevent inheritance.
Setting env in the toplevel dune-workspace file doesn't have that limitation.
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.rstfor the protocol and the environment, theDevelopment Versionsection ofCHANGES.mdfor everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR