1Config(3) OCaml library Config(3)
2
3
4
6 Config - System configuration
7
9 Module Config
10
12 Module Config
13 : sig end
14
15
16 System configuration
17
18 Warning: this module is unstable and part of Compiler_libs .
19
20
21
22
23
24
25 val version : string
26
27 The current version number of the system
28
29
30
31 val bindir : string
32
33 The directory containing the binary programs
34
35
36
37 val standard_library : string
38
39 The directory containing the standard libraries
40
41
42
43 val ccomp_type : string
44
45 The "kind" of the C compiler, assembler and linker used: one of "cc"
46 (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)
47
48
49
50 val c_compiler : string
51
52 The compiler to use for compiling C files
53
54
55
56 val c_output_obj : string
57
58 Name of the option of the C compiler for specifying the output file
59
60
61
62 val c_has_debug_prefix_map : bool
63
64 Whether the C compiler supports -fdebug-prefix-map
65
66
67
68 val as_has_debug_prefix_map : bool
69
70 Whether the assembler supports --debug-prefix-map
71
72
73
74 val ocamlc_cflags : string
75
76 The flags ocamlc should pass to the C compiler
77
78
79
80 val ocamlc_cppflags : string
81
82 The flags ocamlc should pass to the C preprocessor
83
84
85
86 val ocamlopt_cflags : string
87
88 Deprecated.
89
90 Config.ocamlc_cflags should be used instead. The flags ocamlopt should
91 pass to the C compiler
92
93
94
95 val ocamlopt_cppflags : string
96
97 Deprecated.
98
99 Config.ocamlc_cppflags should be used instead. The flags ocamlopt
100 should pass to the C preprocessor
101
102
103
104 val bytecomp_c_libraries : string
105
106 The C libraries to link with custom runtimes
107
108
109
110 val native_c_libraries : string
111
112 The C libraries to link with native-code programs
113
114
115
116 val native_pack_linker : string
117
118 The linker to use for packaging (ocamlopt -pack) and for partial links
119 (ocamlopt -output-obj).
120
121
122
123 val mkdll : string
124
125 The linker command line to build dynamic libraries.
126
127
128
129 val mkexe : string
130
131 The linker command line to build executables.
132
133
134
135 val mkmaindll : string
136
137 The linker command line to build main programs as dlls.
138
139
140
141 val ranlib : string
142
143 Command to randomize a library, or "" if not needed
144
145
146
147 val default_rpath : string
148
149 Option to add a directory to be searched for libraries at runtime (used
150 by ocamlmklib)
151
152
153
154 val mksharedlibrpath : string
155
156 Option to add a directory to be searched for shared libraries at run‐
157 time (used by ocamlmklib)
158
159
160
161 val ar : string
162
163 Name of the ar command, or "" if not needed (MSVC)
164
165
166
167 val interface_suffix : string ref
168
169 Suffix for interface file names
170
171
172
173 val exec_magic_number : string
174
175 Magic number for bytecode executable files
176
177
178
179 val cmi_magic_number : string
180
181 Magic number for compiled interface files
182
183
184
185 val cmo_magic_number : string
186
187 Magic number for object bytecode files
188
189
190
191 val cma_magic_number : string
192
193 Magic number for archive files
194
195
196
197 val cmx_magic_number : string
198
199 Magic number for compilation unit descriptions
200
201
202
203 val cmxa_magic_number : string
204
205 Magic number for libraries of compilation unit descriptions
206
207
208
209 val ast_intf_magic_number : string
210
211 Magic number for file holding an interface syntax tree
212
213
214
215 val ast_impl_magic_number : string
216
217 Magic number for file holding an implementation syntax tree
218
219
220
221 val cmxs_magic_number : string
222
223 Magic number for dynamically-loadable plugins
224
225
226
227 val cmt_magic_number : string
228
229 Magic number for compiled interface files
230
231
232
233 val linear_magic_number : string
234
235 Magic number for Linear internal representation files
236
237
238
239 val max_tag : int
240
241 Biggest tag that can be stored in the header of a regular block.
242
243
244
245 val lazy_tag : int
246
247 Normally the same as Obj.lazy_tag. Separate definition because of
248 technical reasons for bootstrapping.
249
250
251
252 val max_young_wosize : int
253
254 Maximal size of arrays that are directly allocated in the minor heap
255
256
257
258 val stack_threshold : int
259
260 Size in words of safe area at bottom of VM stack, see runtime/caml/con‐
261 fig.h
262
263
264
265 val stack_safety_margin : int
266
267 Size in words of the safety margin between the bottom of the stack and
268 the stack pointer. This margin can be used by intermediate computations
269 of some instructions, or the event handler.
270
271
272
273 val architecture : string
274
275 Name of processor type for the native-code compiler
276
277
278
279 val model : string
280
281 Name of processor submodel for the native-code compiler
282
283
284
285 val system : string
286
287 Name of operating system for the native-code compiler
288
289
290
291 val asm : string
292
293 The assembler (and flags) to use for assembling ocamlopt-generated
294 code.
295
296
297
298 val asm_cfi_supported : bool
299
300 Whether assembler understands CFI directives
301
302
303
304 val with_frame_pointers : bool
305
306 Whether assembler should maintain frame pointers
307
308
309
310 val ext_obj : string
311
312 Extension for object files, e.g. .o under Unix.
313
314
315
316 val ext_asm : string
317
318 Extension for assembler files, e.g. .s under Unix.
319
320
321
322 val ext_lib : string
323
324 Extension for library files, e.g. .a under Unix.
325
326
327
328 val ext_dll : string
329
330 Extension for dynamically-loaded libraries, e.g. .so under Unix.
331
332
333
334 val ext_exe : string
335
336 Extension for executable programs, e.g. .exe under Windows.
337
338
339 Since 4.12.0
340
341
342
343 val default_executable_name : string
344
345 Name of executable produced by linking if none is given with -o, e.g.
346 a.out under Unix.
347
348
349
350 val systhread_supported : bool
351
352 Whether the system thread library is implemented
353
354
355
356 val flexdll_dirs : string list
357
358 Directories needed for the FlexDLL objects
359
360
361
362 val host : string
363
364 Whether the compiler is a cross-compiler
365
366
367
368 val target : string
369
370 Whether the compiler is a cross-compiler
371
372
373
374 val flambda : bool
375
376 Whether the compiler was configured for flambda
377
378
379
380 val with_flambda_invariants : bool
381
382 Whether the invariants checks for flambda are enabled
383
384
385
386 val with_cmm_invariants : bool
387
388 Whether the invariants checks for Cmm are enabled
389
390
391
392 val profinfo : bool
393
394 Whether the compiler was configured for profiling
395
396
397
398 val profinfo_width : int
399
400 How many bits are to be used in values' headers for profiling informa‐
401 tion
402
403
404
405 val safe_string : bool
406
407 Whether the compiler was configured with -force-safe-string; in that
408 case, the -unsafe-string compile-time option is unavailable
409
410
411 Since 4.05.0
412
413
414
415 val default_safe_string : bool
416
417 Whether the compiler was configured to use the -safe-string or -un‐
418 safe-string compile-time option by default.
419
420
421 Since 4.06.0
422
423
424
425 val flat_float_array : bool
426
427 Whether the compiler and runtime automagically flatten float arrays
428
429
430
431 val function_sections : bool
432
433 Whether the compiler was configured to generate each function in a sep‐
434 arate section
435
436
437
438 val windows_unicode : bool
439
440 Whether Windows Unicode runtime is enabled
441
442
443
444 val supports_shared_libraries : bool
445
446 Whether shared libraries are supported
447
448
449 Since 4.08.0
450
451
452
453 val afl_instrument : bool
454
455 Whether afl-fuzz instrumentation is generated by default
456
457
458
459 val print_config : out_channel -> unit
460
461 Access to configuration values
462
463
464
465 val config_var : string -> string option
466
467 the configuration value of a variable, if it exists
468
469
470
471
472
473OCamldoc 2022-02-04 Config(3)