Viewing Assembly Output from OCaml’s ocamlopt Compiler
To generate native assembly code (x86-64 asm, ARM64, etc.) from OCaml’s native compiler, use the -S flag along with other optimization-related options: ocamlopt -S -inline 20 -nodynlink not.ml -o not.opt This produces a .s file containing the generated assembly. The flags break down as: -S — Stop after assembly generation and keep the .s file…
