ocaml-flambda / flambda-backend

The Flambda backend project for OCaml
92 stars 65 forks source link

Implement `-no-approx` and `-no-code` in flambda-backend `ocamlobjinfo` #2737

Closed lukemaurer closed 23 hours ago

lukemaurer commented 1 week ago

(Edit: Thanks to @lthls with lukemaurer#2, this now has finer-grained behavior for -no-approx and -no-code.)

The old -no-approx and -no-code options are currently parsed but ignored. This is inconvenient, since the output for an flambda2 .cmx can be screenfuls long even for relatively small modules.

This PR implements -no-approx by just suppressing .cmx export information altogether (roughly equivalent to what the old one did).

Also implements -no-code by doing exactly the same thing as -no-approx. (Which does indeed mean there's no code.)

mshinwell commented 1 day ago

@lthls are you able to approve?