This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit 3035408 1 parent 90451e2 commit 3035408 Copy full SHA for 3035408
File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
.PHONY : all unix clean
2
2
3
3
JOBS ?= -j 4
4
+ OFLAGS ?= -classic-display
4
5
5
6
all : unix-direct unix-socket
6
7
7
8
unix-direct :
8
9
@mkdir -p _build
9
- @env MIRAGEOS=unix MIRAGEFLOW=direct ocamlbuild $(JOBS ) unix.otarget
10
+ @env MIRAGEOS=unix MIRAGEFLOW=direct ocamlbuild $(OFLAGS ) $( JOBS ) unix.otarget
10
11
11
12
unix-socket :
12
13
@mkdir -p _build
13
- @env MIRAGEOS=unix MIRAGEFLOW=socket ocamlbuild $(JOBS ) unix.otarget
14
+ @env MIRAGEOS=unix MIRAGEFLOW=socket ocamlbuild $(OFLAGS ) $( JOBS ) unix.otarget
14
15
15
16
xen-direct :
16
17
@mkdir -p _build
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ let ps = Printf.sprintf
8
8
let ep = Printf. eprintf
9
9
10
10
let debug = false
11
+ let profiling = false
11
12
12
13
(* This decides the global OS backend. It could be moved into explicit
13
14
dependencies in the future, but for now is set as an environment
@@ -230,6 +231,8 @@ let _ = dispatch begin function
230
231
(* do not compile and pack with the standard lib *)
231
232
flag [" ocaml" ; " compile" ; " mirage" ] & S [A " -nostdlib" ];
232
233
flag [" ocaml" ; " pack" ; " mirage" ] & S [A " -nostdlib" ];
234
+ if profiling then
235
+ flag [" ocaml" ; " compile" ; " native" ] & S [A " -p" ];
233
236
234
237
(* use pa_`lib` syntax extension if the _tags file specifies it *)
235
238
let p4_build = " ../../../syntax/_build" in
@@ -264,6 +267,8 @@ let _ = dispatch begin function
264
267
(* base cflags for C code *)
265
268
flag [" c" ; " compile" ] & S CC. cc_cflags;
266
269
flag [" asm" ; " compile" ] & S [A " -D__ASSEMBLY__" ];
270
+ if profiling then
271
+ flag [" c" ; " compile" ] & S [A " -pg" ];
267
272
268
273
(* xen code needs special cflags *)
269
274
flag [" c" ; " compile" ; " include_xen" ] & S CC. xen_incs;
You can’t perform that action at this time.
0 commit comments