File: mkflags.ml

package info (click to toggle)
ocaml-gen 0.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 296 kB
  • sloc: ml: 2,124; makefile: 35
file content (14 lines) | stat: -rw-r--r-- 419 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14

 let () =
   let major, minor =
     Scanf.sscanf Sys.ocaml_version "%u.%u"
       (fun major minor -> major, minor)
   in
   let after_4_3 = (major, minor) >= (4, 3) in
   let flags_file = open_out "flambda.flags" in
   if after_4_3 then (
     output_string flags_file "(-O3 -unbox-closures -unbox-closures-factor 20 -color always)\n";
   ) else (
     output_string flags_file "()\n";
   );
   close_out flags_file