projects
/
SXSI
/
xpathcomp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d8e8a2b
)
Ensure that the c++ flags defined in myocamlbuild_config.ml.in are passed
author
Kim Nguyễn
<kn@lri.fr>
Wed, 14 Mar 2012 23:20:49 +0000
(
00:20
+0100)
committer
Kim Nguyễn
<kn@lri.fr>
Wed, 14 Mar 2012 23:20:49 +0000
(
00:20
+0100)
to ocamlopt for linking.
myocamlbuild.ml
patch
|
blob
|
history
myocamlbuild_config.ml.in
patch
|
blob
|
history
diff --git
a/myocamlbuild.ml
b/myocamlbuild.ml
index
3e14dfa
..
9c90feb
100644
(file)
--- a/
myocamlbuild.ml
+++ b/
myocamlbuild.ml
@@
-9,9
+9,8
@@
let print_list l =
let _A x = A x
let _S ?(extra=N) l = S (List.map (fun e -> (S [extra; _A e] )) l)
;;
let _A x = A x
let _S ?(extra=N) l = S (List.map (fun e -> (S [extra; _A e] )) l)
;;
-
+let cxx_flags_for_ml = [ _S ~extra:(_A "-ccopt") cxx_flags ]
let cxx_flags = ref [ _S cxx_flags ]
let cxx_flags = ref [ _S cxx_flags ]
-
let project_dirs = [ src_path; include_path ]
let cxx_include_flags = _S cxx_includes
let cxx_link_flags = ref [ _S cxx_lpaths; _S cxx_libs]
let project_dirs = [ src_path; include_path ]
let cxx_include_flags = _S cxx_includes
let cxx_link_flags = ref [ _S cxx_lpaths; _S cxx_libs]
@@
-148,10
+147,10
@@
let () = dispatch begin
S (ppopt !pp_macro_options) ])
in
flag [ "ocaml"; "ocamldep"] syntax_flags;
S (ppopt !pp_macro_options) ])
in
flag [ "ocaml"; "ocamldep"] syntax_flags;
- flag [ "ocaml"; "compile" ] (S[ A "-cc"; A cxx_cmd; syntax_flags; S !compile_flags ]);
+ flag [ "ocaml"; "compile" ] (S[ A "-cc"; A cxx_cmd;
S cxx_flags_for_ml ;
syntax_flags; S !compile_flags ]);
flag [ "ocaml"; "native"; "compile" ] (S !native_compile_flags);
flag [ "ocaml"; "link" ]
flag [ "ocaml"; "native"; "compile" ] (S !native_compile_flags);
flag [ "ocaml"; "link" ]
- (S [ S link_flags ; A "-cc"; A cxx_cmd; A "-cclib" ;
+ (S [ S link_flags ; A "-cc"; A cxx_cmd;
S cxx_flags_for_ml;
A "-cclib" ;
Quote (S [ _S cstub_lib; S !cxx_link_flags]) ]);
flag [ "ocaml"; "byte"; "link" ] (_S !byte_link_flags);
flag [ "ocaml"; "native"; "link" ] (_S !native_link_flags);
Quote (S [ _S cstub_lib; S !cxx_link_flags]) ]);
flag [ "ocaml"; "byte"; "link" ] (_S !byte_link_flags);
flag [ "ocaml"; "native"; "link" ] (_S !native_link_flags);
diff --git
a/myocamlbuild_config.ml.in
b/myocamlbuild_config.ml.in
index
e6c4874
..
2b64c14
100644
(file)
--- a/
myocamlbuild_config.ml.in
+++ b/
myocamlbuild_config.ml.in
@@
-1,9
+1,9
@@
-let ocaml_inline = "10
00
";;
+let ocaml_inline = "10";;
let include_path = "include";;
let src_path = "src";;
let ocaml_link = [ ];;
let ocamlfind_packages = "unix,ulex,expat,camlp4,camlp4.lib";;
let include_path = "include";;
let src_path = "src";;
let ocaml_link = [ ];;
let ocamlfind_packages = "unix,ulex,expat,camlp4,camlp4.lib";;
-let cxx_flags = [ "-fno-PIC"; "-std=c++0x"; "-
static" ; "-
flto"; "-O3" ];;
+let cxx_flags = [ "-fno-PIC"; "-std=c++0x"; "-flto"; "-O3" ];;
let main_targets = [ "native","src/main.native";
"byte", "src/main.byte" ];;
let cstub_lib = [ "src/libcamlshredder.a" ];;
let main_targets = [ "native","src/main.native";
"byte", "src/main.byte" ];;
let cstub_lib = [ "src/libcamlshredder.a" ];;