aboutsummaryrefslogtreecommitdiff
path: root/lib/flags.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-12-18 15:55:23 +0100
committerPierre-Marie Pédrot2019-12-22 14:04:53 +0100
commitacba2419a4cebb2b55bad2aefa2062640ffe8828 (patch)
tree44231e66a98a36360041c9d48123507ca894ca79 /lib/flags.ml
parent9c75b6a6582620e2fb9a39c1ea1aa46a321af6a7 (diff)
Centralize the flag handling native compilation.
Instead of relying on the Coq_config immutable flag, we introduce an initialization-only flag to govern the use of the native compiler. This allows to make coqc passed with "-native-compiler no" behave as if it had been configured without native compilation.
Diffstat (limited to 'lib/flags.ml')
-rw-r--r--lib/flags.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/flags.ml b/lib/flags.ml
index b87ba46634..1fe52c3b95 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -82,3 +82,11 @@ let get_inline_level () = !inline_level
let profile_ltac = ref false
let profile_ltac_cutoff = ref 2.0
+
+let native_compiler = ref None
+let get_native_compiler () = match !native_compiler with
+| None -> assert false
+| Some b -> b
+let set_native_compiler b =
+ let () = assert (!native_compiler == None) in
+ native_compiler := Some b