aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-10-10 15:54:38 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-10-10 15:54:38 +0200
commitf790c6ac8b16f71aae4868cbcad87a39f50727e3 (patch)
tree026665b355bf3c2712c3148b8e459e85ee10199a /kernel
parent16f169b3c756aa3c5cbc38eb13412ba23ae2937d (diff)
parent1d8725b59309c2c9f870eb52a2daebe87ed9ad5b (diff)
Merge PR #540: [configure] Support for flambda flags.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nativelib.ml15
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"