Browse files

[build] activate profiling by default (temporary change)

  • Loading branch information...
1 parent 0e5486d commit 76e797f7159a775f911389821e0c859ae62fb082 @avsm committed Nov 18, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −1 lib/myocamlbuild.ml
  2. +4 −1 scripts/myocamlbuild.ml
View
2 lib/myocamlbuild.ml
@@ -25,7 +25,7 @@ let ps = Printf.sprintf
let ep = Printf.eprintf
let debug = false
-let profiling = false
+let profiling = true
let native_p4 = true (* In case you have problems with natdynlink, set this to false *)
module Spec = struct
View
5 scripts/myocamlbuild.ml
@@ -28,6 +28,8 @@ let lib = getenv ~default:(home / "mir-inst") "MIRAGELIB"
let cc = getenv ~default:"cc" "CC"
let ld = getenv ~default:"ld" "LD"
+let profiling = true
+
(** Utility functions (e.g. to execute a command and return lines read) *)
module Util = struct
let split s ch =
@@ -93,7 +95,7 @@ module Mir = struct
|Linux -> [A"-lm"; A runlib; A"-lcamlstr"; A"-ldl"; A"-ltermcap"]
|Darwin -> [A"-lm"; A runlib; A"-lcamlstr"; A"-ltermcap"] in
let tags = tags++"cc"++"c" in
- Cmd (S (A cc :: [ T(tags++"link"); A ocamlc_libdir; A"-o"; Px out;
+ Cmd (S (A cc :: [ T(tags++"link"); A"-pg"; A ocamlc_libdir; A"-o"; Px out;
A (unixmain mode); P arg; A (unixrun mode); ] @ dl_libs))
(** Link to a standalone Xen microkernel *)
@@ -437,6 +439,7 @@ let _ = dispatch begin function
flag ["ocaml"; "compile"] & std_flags;
flag ["ocaml"; "pack"] & std_flags;
flag ["ocaml"; "link"] & std_flags;
+ flag ["ocaml"; "native"; "compile"] & S [A"-p"];
(* Include the correct stdlib depending on which backend is chosen *)
List.iter (fun be ->
let be = Spec.backend_to_string be in

0 comments on commit 76e797f

Please sign in to comment.