Merge branch 'reentrent-timing'
authorKim Nguyễn <kn@lri.fr>
Fri, 26 Oct 2012 12:04:11 +0000 (14:04 +0200)
committerKim Nguyễn <kn@lri.fr>
Fri, 26 Oct 2012 12:04:11 +0000 (14:04 +0200)
The work in this branch makes the timing function re-entrant. It is now
possible to do (Utils.time f x ~msg:"Timing f") where f does
(Utils.time g y ~msg:"Timing g") and time will properly print out the timing
for g and f (in that order) when f returns.

myocamlbuild.ml

index 6f27e4e..6121130 100644 (file)
@@ -20,7 +20,7 @@ let link_flags = [ A"-linkpkg" ]
 let libs_files = List.map (fun s -> "file:" ^ s) cxx_libs_objects
 
 
-let native_compile_flags = ref [A"-fno-PIC"]
+let native_compile_flags = if Sys.word_size = 64 then ref [A"-fno-PIC"] else ref []
 let compile_flags = ref []
 
 let dwsize = sprintf "-DWORDSIZE%i" Sys.word_size