X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=myocamlbuild.ml;h=6121130738bf54e44cf88ac9dac1c702ad93e6b7;hb=HEAD;hp=d0277af0d80004f35ed75809d6442676ef653664;hpb=7c4c61cec6fe1ae3a1b83a59b17ce90adcfe9b0b;p=SXSI%2Fxpathcomp.git diff --git a/myocamlbuild.ml b/myocamlbuild.ml index d0277af..6121130 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -17,8 +17,10 @@ let cxx_link_flags = ref [ _S cxx_lpaths; _S cxx_libs] let native_link_flags = ref (List.map (fun s -> s ^ ".cmxa") ocaml_link) let byte_link_flags = ref ("-custom" :: (List.map (fun s -> s ^ ".cma") ocaml_link)) 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 @@ -125,7 +127,7 @@ let () = dispatch begin compile_flags @= [A "-noassert"]; pp_macro_options @= [ A "-unsafe" ]; native_compile_flags @= [ A "-inline"; A ocaml_inline ]; - cxx_flags @= [ A "-O3" ] + cxx_flags @= [ A "-O3"; A "-DNDEBUG" ] end; let dir_path = Pathname.pwd / src_path in @@ -140,7 +142,6 @@ let () = dispatch begin | After_rules -> dep [ "link" ] cstub_lib; - rule "c++: cpp & depends -> o" ~prod:"%.o" ~deps:[ "%.cpp" ] cxx_compile; let syntax_flags = S ([ A "-syntax"; A "camlp4o"; S (ppopt [A "-printer" ; A"Camlp4OCamlAstDumper"]);