Skip to content

Commit bc0bc5e

Browse files
mshinwellxclerc
andauthored
flambda-backend: Add config variables flambda_backend, flambda2 and probes (#99)
* Add config variable flambda_backend=true * Add flambda2 and probes config vars * probes Co-authored-by: Xavier Clerc <[email protected]> * Expose flambda_backend in config.mli * Update ocaml/utils/config.mlp Co-authored-by: Xavier Clerc <[email protected]> Co-authored-by: Xavier Clerc <[email protected]>
1 parent efb8304 commit bc0bc5e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

utils/config.mli

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ val flambda : bool
200200
val flambda2 : bool
201201
(** Whether the compiler was configured for Flambda 2 *)
202202

203+
val flambda_backend : bool
204+
(** [true] if the compiler was built in a Flambda backend repo, [false] if
205+
the compiler was built as per upstream. *)
206+
203207
val with_flambda_invariants : bool
204208
(** Whether the invariants checks for flambda are enabled *)
205209

utils/config.mlp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ let mkdll, mkexe, mkmaindll =
7676
let flambda = %%FLAMBDA%%
7777
let flambda2 = %%FLAMBDA2%%
7878
let with_flambda_invariants = %%WITH_FLAMBDA_INVARIANTS%%
79+
80+
let flambda_backend = true
81+
7982
let safe_string = %%FORCE_SAFE_STRING%%
8083
let default_safe_string = %%DEFAULT_SAFE_STRING%%
8184
let windows_unicode = %%WINDOWS_UNICODE%% != 0
@@ -193,6 +196,7 @@ let configuration_variables =
193196
p "host" host;
194197
p "target" target;
195198
p_bool "flambda" flambda;
199+
p_bool "flambda2" flambda2;
196200
p_bool "safe_string" safe_string;
197201
p_bool "default_safe_string" default_safe_string;
198202
p_bool "flat_float_array" flat_float_array;
@@ -212,6 +216,9 @@ let configuration_variables =
212216
p "cmxs_magic_number" cmxs_magic_number;
213217
p "cmt_magic_number" cmt_magic_number;
214218
p "linear_magic_number" linear_magic_number;
219+
220+
p_bool "flambda_backend" flambda_backend;
221+
p_bool "probes" probes;
215222
]
216223

217224
let print_config_value oc = function

0 commit comments

Comments
 (0)