Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 76e797f

Browse files
committedNov 18, 2011
[build] activate profiling by default (temporary change)
1 parent 0e5486d commit 76e797f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎lib/myocamlbuild.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let ps = Printf.sprintf
2525
let ep = Printf.eprintf
2626

2727
let debug = false
28-
let profiling = false
28+
let profiling = true
2929
let native_p4 = true (* In case you have problems with natdynlink, set this to false *)
3030

3131
module Spec = struct

‎scripts/myocamlbuild.ml

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ let lib = getenv ~default:(home / "mir-inst") "MIRAGELIB"
2828
let cc = getenv ~default:"cc" "CC"
2929
let ld = getenv ~default:"ld" "LD"
3030

31+
let profiling = true
32+
3133
(** Utility functions (e.g. to execute a command and return lines read) *)
3234
module Util = struct
3335
let split s ch =
@@ -93,7 +95,7 @@ module Mir = struct
9395
|Linux -> [A"-lm"; A runlib; A"-lcamlstr"; A"-ldl"; A"-ltermcap"]
9496
|Darwin -> [A"-lm"; A runlib; A"-lcamlstr"; A"-ltermcap"] in
9597
let tags = tags++"cc"++"c" in
96-
Cmd (S (A cc :: [ T(tags++"link"); A ocamlc_libdir; A"-o"; Px out;
98+
Cmd (S (A cc :: [ T(tags++"link"); A"-pg"; A ocamlc_libdir; A"-o"; Px out;
9799
A (unixmain mode); P arg; A (unixrun mode); ] @ dl_libs))
98100

99101
(** Link to a standalone Xen microkernel *)
@@ -437,6 +439,7 @@ let _ = dispatch begin function
437439
flag ["ocaml"; "compile"] & std_flags;
438440
flag ["ocaml"; "pack"] & std_flags;
439441
flag ["ocaml"; "link"] & std_flags;
442+
flag ["ocaml"; "native"; "compile"] & S [A"-p"];
440443
(* Include the correct stdlib depending on which backend is chosen *)
441444
List.iter (fun be ->
442445
let be = Spec.backend_to_string be in

0 commit comments

Comments
 (0)
Please sign in to comment.