---
name: "Config_boot"
section: "3o"
platform: "linux"
package: "ocaml"
version: "5.5.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Config_boot"
---

# Config\_boot(3o)

System configuration

## NAME

Config\_boot - System configuration

## Module

Module   Config\_boot

## Documentation

Module **Config\_boot**\
  :  **sig end**

System configuration

Warning: this module is unstable and part of **Compiler\_libs** .

*val version* :  **string**

The current version number of the system

*val release\_number* :  **int**

The release number for the compiler

**Since** 5.5

*val is\_official\_release* :  **bool**

True if the compiler is an unmodified official OCaml release

**Since** 5.5

*val bindir* :  **string**

The directory containing the binary programs. If the compiler was configured with  **--with-relative-libdir** then this will be the directory containing the currently executing runtime.

*val standard\_library\_relative* :  **string option**

The explicit relative path from the compiler binaries to the standard libraries directory if the compiler was configured with **--with-relative-libdir** , or  **None** otherwise.

**Since** 5.5

*val target\_bindir* :  **string**

The directory containing the runtime binaries on the target system

**Since** 5.5

*val standard\_library\_default* :  **string**

The effective value for the default directory containing the standard libraries. This is always an absolute path, computed using **Config\_boot.standard\_library\_relative** if necessary.

**Since** 5.5

*val standard\_library* :  **string**

The effective directory containing the standard libraries, taking CAMLLIB and OCAMLLIB into account.

*val ccomp\_type* :  **string**

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

*val c\_compiler* :  **string**

The compiler to use for compiling C files

*val c\_compiler\_vendor* :  **string**

The vendor and version of the C compiler. Consists of hyphenated values where the first part indicates the C compiler's vendor and remaining parts indicate the version of the C compiler, as reported by that C compiler's preprocessor.

Possible values are:

\-msvc - Windows, using Microsoft Visual Studio. \_MSC\_VER follows and optionally clang- if clang-cl, rather than Visual Studio itself, is in use.

\-icc - Intel C Compiler.

\-mingw - Windows, using the mingw-w64 project. The major and minor version of mingw-w64 itself follow and then either gcc- or clang- indicating which C compiler is in use.

\-clang - Clang LLVM C Compiler.

\-gcc - GNU Compiler Collection C Compiler.

\-xlc - IBM XL C Compiler.

\-sunc - Oracle Solaris Studio.

\-unknown - unknown compiler vendor. No additional version info.

**Since** 5.5

*val c\_output\_obj* :  **string**

Name of the option of the C compiler for specifying the output file

*val c\_has\_debug\_prefix\_map* :  **bool**

Whether the C compiler supports -fdebug-prefix-map

*val as\_has\_debug\_prefix\_map* :  **bool**

Whether the assembler supports --debug-prefix-map

*val as\_is\_cc* :  **bool**

Whether the assembler is actually an assembler, or whether we are really assembling files via the C compiler

**Since** 5.5

*val bytecode\_cflags* :  **string**

The flags ocamlc should pass to the C compiler

*val bytecode\_cppflags* :  **string**

The flags ocamlc should pass to the C preprocessor

*val native\_cflags* :  **string**

The flags ocamlopt should pass to the C compiler

*val native\_cppflags* :  **string**

The flags ocamlopt should pass to the C preprocessor

*val bytecomp\_c\_libraries* :  **string**

The C libraries to link with custom runtimes

*val native\_c\_libraries* :  **string**

The C libraries to link with native-code programs

*val compression\_c\_libraries* :  **string**

The C libraries needed with -lcomprmarsh (should appear before **Config\_boot.native\_c\_libraries** in a call to the C compiler)

**Since** 5.4

*val native\_ldflags* :  **string**

*val with\_nonexecstack\_note* :  **bool**

Whether an explicit ".note.GNU-stack" section is to be added to indicate the stack should not be executable

**Since** 5.4

*val native\_pack\_linker* :  **string**

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

*val mkdll* :  **string**

The linker command line to build dynamic libraries.

*val mkexe* :  **string**

The linker command line to build executables.

*val mkmaindll* :  **string**

The linker command line to build main programs as dlls.

*val default\_rpath* :  **string**

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

*val mksharedlibrpath* :  **string**

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

*val ar* :  **string**

Name of the ar command, or "" if not needed  (MSVC)

*val interface\_suffix* :  **string ref**

Suffix for interface file names

*val exec\_magic\_number* :  **string**

Magic number for bytecode executable files

*val cmi\_magic\_number* :  **string**

Magic number for compiled interface files

*val cmo\_magic\_number* :  **string**

Magic number for object bytecode files

*val cma\_magic\_number* :  **string**

Magic number for archive files

*val cmx\_magic\_number* :  **string**

Magic number for compilation unit descriptions

*val cmxa\_magic\_number* :  **string**

Magic number for libraries of compilation unit descriptions

*val ast\_intf\_magic\_number* :  **string**

Magic number for file holding an interface syntax tree

*val ast\_impl\_magic\_number* :  **string**

Magic number for file holding an implementation syntax tree

*val cmxs\_magic\_number* :  **string**

Magic number for dynamically-loadable plugins

*val cmt\_magic\_number* :  **string**

Magic number for compiled interface files

*val linear\_magic\_number* :  **string**

Magic number for Linear internal representation files

*val max\_tag* :  **int**

Biggest tag that can be stored in the header of a regular block.

*val lazy\_tag* :  **int**

Normally the same as Obj.lazy\_tag.  Separate definition because of technical reasons for bootstrapping.

*val max\_young\_wosize* :  **int**

Maximal size of arrays that are directly allocated in the minor heap

*val stack\_threshold* :  **int**

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

*val stack\_safety\_margin* :  **int**

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

*val native\_compiler* :  **bool**

Whether the native compiler is available or not

**Since** 5.1

*val architecture* :  **string**

Name of processor type for the native-code compiler

*val model* :  **string**

Name of processor submodel for the native-code compiler

*val system* :  **string**

Name of operating system for the native-code compiler

*val target\_os\_type* :  **string**

Operating system targeted by the native-code compiler. One of

\-  **"Unix"** (for all Unix versions, including Linux and macOS),

\-  **"Win32"** (for MS-Windows, OCaml compiled with MSVC++ or MinGW-w64),

\-  **"Cygwin"** (for MS-Windows, OCaml compiled with Cygwin).

**Since** 5.4

*val target\_unix* :  **bool**

True if  **target\_os\_type = "Unix"**

**Since** 5.5

*val target\_win32* :  **bool**

True if  **target\_os\_type = "Win32"**

**Since** 5.5

*val target\_cygwin* :  **bool**

True if  **target\_os\_type = "Cygwin"**

**Since** 5.5

*val asm* :  **string**

The assembler (and flags) to use for assembling ocamlopt-generated code.

*val asm\_cfi\_supported* :  **bool**

Whether assembler understands CFI directives

*val asm\_size\_type\_directives* :  **bool**

Whether the  **.size** and  **.type** assembler directives can be used

**Since** 5.4

*val asm\_dwarf\_version* :  **int option**

The DWARF Version emitted by the  **Config\_boot.asm** command. At present this is only implemented for the clang internal assembler, all other assemblers have **None** .

**Since** 5.5

*val with\_frame\_pointers* :  **bool**

Whether assembler should maintain frame pointers

*val ext\_obj* :  **string**

Extension for object files, e.g.  **.o** under Unix.

*val ext\_asm* :  **string**

Extension for assembler files, e.g.  **.s** under Unix.

*val ext\_lib* :  **string**

Extension for library files, e.g.  **.a** under Unix.

*val ext\_dll* :  **string**

Extension for dynamically-loaded libraries, e.g.  **.so** under Unix.

*val ext\_exe* :  **string**

Extension for executable programs, e.g.  **.exe** under Windows.

**Since** 4.12

*val default\_executable\_name* :  **string**

Name of executable produced by linking if none is given with -o, e.g.  **a.out** under Unix.

*val systhread\_supported* :  **bool**

Whether the system thread library is implemented

*val flexdll\_dirs* :  **string list**

Directories needed for the FlexDLL objects

*val host* :  **string**

Whether the compiler is a cross-compiler

*val target* :  **string**

Whether the compiler is a cross-compiler

*val flambda* :  **bool**

Whether the compiler was configured for flambda

*val with\_flambda\_invariants* :  **bool**

Whether the invariants checks for flambda are enabled

*val with\_cmm\_invariants* :  **bool**

Whether the invariants checks for Cmm are enabled

*val with\_codegen\_invariants* :  **bool**

Whether the invariant checks for native code generation are enabled.

*val reserved\_header\_bits* :  **int**

How many bits of a block's header are reserved

*val flat\_float\_array* :  **bool**

Whether the compiler and runtime automagically flatten float arrays

*val align\_double* :  **bool**

Whether the compiler and runtime need to align double values. If  **false** , a  **floatarray** value can be cast to a C array of doubles.

*val align\_int64* :  **bool**

Whether the compiler and runtime need to align int64 values

*val function\_sections* :  **bool**

Whether the compiler was configured to generate each function in a separate section

*val windows\_unicode* :  **bool**

Whether Windows Unicode runtime is enabled

*val naked\_pointers* :  **bool**

Whether the runtime supports naked pointers

**Since** 4.14

*val supports\_shared\_libraries* :  **bool**

Whether shared libraries are supported

**Since** 4.08

*val native\_dynlink* :  **bool**

Whether native shared libraries are supported

**Since** 5.1

*val afl\_instrument* :  **bool**

Whether afl-fuzz instrumentation is generated by default

*val ar\_supports\_response\_files* :  **bool**

Whether ar supports @FILE arguments.

*val tsan* :  **bool**

Whether ThreadSanitizer instrumentation is enabled

*type launch\_method* =\
  \| Executable  (\* Use the executable launcher stub\
  \*)\
  \| Shebang **of** **string option**   \
   (\* Use a shebang-style launcher. Whenever possible, the interpreter will be the runtime itself, but if the path to the runtime is not valid for a shebang line, then a shell script is generated. When this is necessary, the parameter in  **Shebang (Some sh)** is the full path to  **sh** ; if the parameter is  **None** , then the linker searches PATH for  **sh** .\
  \*)

Launch mechanisms for bytecode executables

**Since** 5.5

*val launch\_method* :  **launch\_method**

Default launch mechanism for bytecode executables

**Since** 5.5

*type search\_method* =\
  \| Disable  (\* Interpreter searching disabled - check fixed absolute location only\
  \*)\
  \| Fallback  (\* Check fixed absolute location first, but fall back to a search if that fails\
  \*)\
  \| Enable  (\* Always search for the interpreter\
  \*)

Mechanisms used by tendered bytecode executables to locate the interpreter

**Since** 5.5

*val search\_method* :  **search\_method**

Default search mechanism for bytecode executables

**Since** 5.5

*val shebangscripts* :  **bool**

Whether the target supports shebang scripts

**Since** 5.5

*val suffixing* :  **bool**

Whether the runtime executable and shared library filenames and C stub library filenames are being mangled with Runtime IDs and the  **Config\_boot.target** .

**Since** 5.5

*val bytecode\_runtime\_id* :  **string**

The Runtime ID for this build of the bytecode runtime system

**Since** 5.5

*val native\_runtime\_id* :  **string**

The Runtime ID for this build of the native runtime system

**Since** 5.5

*val print\_config* :  **out\_channel -\> unit**

Access to configuration values

*val config\_var* :  **string -\> string option**

the configuration value of a variable, if it exists
