diff options
author | 2017-10-10 15:54:38 +0200 | |
---|---|---|
committer | 2017-10-10 15:54:38 +0200 | |
commit | f790c6ac8b16f71aae4868cbcad87a39f50727e3 (patch) | |
tree | 026665b355bf3c2712c3148b8e459e85ee10199a /kernel | |
parent | 16f169b3c756aa3c5cbc38eb13412ba23ae2937d (diff) | |
parent | 1d8725b59309c2c9f870eb52a2daebe87ed9ad5b (diff) |
Merge PR #540: [configure] Support for flambda flags.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/nativelib.ml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/kernel/nativelib.ml b/kernel/nativelib.ml index 665ddf7a6..e9c0e171a 100644 --- a/kernel/nativelib.ml +++ b/kernel/nativelib.ml @@ -74,7 +74,7 @@ let call_compiler ?profile:(profile=false) ml_filename = let remove f = if Sys.file_exists f then Sys.remove f in remove link_filename; remove (f ^ ".cmi"); - let initial_args = + let initial_args = if Dynlink.is_native then ["opt"; "-shared"] else @@ -86,9 +86,20 @@ let call_compiler ?profile:(profile=false) ml_filename = else [] in + let flambda_args = + if Coq_config.caml_version_nums >= [4;3;0] then + (* We play safe for now, and use the native compiler + with -Oclassic, however it is likely that `native_compute` + users can benefit from tweaking here. + *) + ["-Oclassic"] + else + [] + in let args = initial_args @ - profile_args @ + profile_args @ + flambda_args @ ("-o"::link_filename ::"-rectypes" ::"-w"::"a" |