Commits

camlspotter committed 34abd35

OCAML_ANNOT env variable for -annot and -bin-annot

  • Participants
  • Parent commits bb92dae
  • Branches annot

Comments (0)

Files changed (2)

File driver/main.ml

 
 let main () =
   try
+    (* OCAML_ANNOT env variable to turn on -annot by default *)
+    (try ignore (Sys.getenv "OCAML_ANNOT"); 
+         Clflags.annotations := true;
+         Clflags.binary_annotations := true;
+    with Not_found -> ()); 
     Arg.parse Options.list anonymous usage;
     if
       List.length (List.filter (fun x -> !x)

File driver/optmain.ml

   native_code := true;
   let ppf = Format.err_formatter in
   try
+    (* OCAML_ANNOT env variable to turn on -annot by default *)
+    (try ignore (Sys.getenv "OCAML_ANNOT"); 
+         Clflags.annotations := true;
+         Clflags.binary_annotations := true;
+    with Not_found -> ()); 
     Arg.parse (Arch.command_line_options @ Options.list) anonymous usage;
     if
       List.length (List.filter (fun x -> !x)