You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when cmxa is used, ocamlopt will only link those modules that are used. Since there are no other input files, the produced file is empty and totally useless.
Proposed solutions
Passing the -linkall option will resolve this issue and the cmxs file will have the same units as the cmxa file.
Alternatively, the cmxa file could be defined the same as cmxa rule, i.e., to build the output from the cmx files (and ofiles).
The former solution is easier to implement, the latter provides more opportunities for parallelization (cmxs and cmxa could be built in parallel), but at the cost of slightly more complex rule.
I can PRovide either solution so if you have any preferences I'm interested to know.
The text was updated successfully, but these errors were encountered:
The rule to build the %.cmxs files
However, when
cmxa
is used,ocamlopt
will only link those modules that are used. Since there are no other input files, the produced file is empty and totally useless.Proposed solutions
Passing the
-linkall
option will resolve this issue and thecmxs
file will have the same units as the cmxa file.Alternatively, the cmxa file could be defined the same as cmxa rule, i.e., to build the output from the
cmx
files (and ofiles).The former solution is easier to implement, the latter provides more opportunities for parallelization (cmxs and cmxa could be built in parallel), but at the cost of slightly more complex rule.
I can PRovide either solution so if you have any preferences I'm interested to know.
The text was updated successfully, but these errors were encountered: