Commit f5429e51 authored by Richard W.M. Jones's avatar Richard W.M. Jones

Use -g -warn-error.

Use -g for ocamlopt.  ocamlopt has supported generating DWARF
information for quite a long time.

Also use -warn-error with the same set of warnings as is used
by libguestfs.

Fix a warning in examples/get_cpu_stats.ml found by enabling
-warn-error.
parent 63e0ba39
......@@ -18,10 +18,10 @@
OCAMLFIND = @OCAMLFIND@
OCAMLCPACKAGES := -package unix -I ../libvirt
OCAMLCFLAGS := -g
OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLCLIBS := -linkpkg
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
OCAMLOPTFLAGS :=
OCAMLOPTFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLOPTLIBS := $(OCAMLCLIBS)
export LIBRARY_PATH=../libvirt
......
......@@ -19,9 +19,11 @@ let () =
let conn = C.connect_readonly () in
(*
let nr_pcpus =
let info = C.get_node_info conn in
C.maxcpus_of_node_info info in
*)
let stats =
let dom = D.lookup_by_name conn domname in
......
......@@ -31,15 +31,15 @@ OCAMLMKLIB = @OCAMLMKLIB@
ifneq ($(OCAMLFIND),)
OCAMLCPACKAGES := -package unix
OCAMLCFLAGS := -g
OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLCLIBS := -linkpkg
else
OCAMLCINCS :=
OCAMLCFLAGS := -g
OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLCLIBS := unix.cma
endif
OCAMLOPTFLAGS :=
OCAMLOPTFLAGS := $(OCAMLCFLAGS)
ifneq ($(OCAMLFIND),)
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
OCAMLOPTLIBS := $(OCAMLCLIBS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment