logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Config_main - System configuration

Documentation

       Module Config_main
        : sigend

       System configuration

       Warning: this module is unstable and part of Compiler_libs .

       valversion : string

       The current version number of the system

       valbindir : string

       The directory containing the binary programs

       valstandard_library : string

       The directory containing the standard libraries

       valccomp_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)

       valc_compiler : string

       The compiler to use for compiling C files

       valc_output_obj : string

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

       valc_has_debug_prefix_map : bool

       Whether the C compiler supports -fdebug-prefix-map

       valas_has_debug_prefix_map : bool

       Whether the assembler supports --debug-prefix-map

       valbytecode_cflags : string

       The flags ocamlc should pass to the C compiler

       valbytecode_cppflags : string

       The flags ocamlc should pass to the C preprocessor

       valnative_cflags : string

       The flags ocamlopt should pass to the C compiler

       valnative_cppflags : string

       The flags ocamlopt should pass to the C preprocessor

       valbytecomp_c_libraries : string

       The C libraries to link with custom runtimes

       valnative_c_libraries : string

       The C libraries to link with native-code programs

       valnative_ldflags : stringvalnative_pack_linker : string

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

       valmkdll : string

       The linker command line to build dynamic libraries.

       valmkexe : string

       The linker command line to build executables.

       valmkmaindll : string

       The linker command line to build main programs as dlls.

       valdefault_rpath : string

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

       valmksharedlibrpath : string

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

       valar : string

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

       valinterface_suffix : stringref

       Suffix for interface file names

       valexec_magic_number : string

       Magic number for bytecode executable files

       valcmi_magic_number : string

       Magic number for compiled interface files

       valcmo_magic_number : string

       Magic number for object bytecode files

       valcma_magic_number : string

       Magic number for archive files

       valcmx_magic_number : string

       Magic number for compilation unit descriptions

       valcmxa_magic_number : string

       Magic number for libraries of compilation unit descriptions

       valast_intf_magic_number : string

       Magic number for file holding an interface syntax tree

       valast_impl_magic_number : string

       Magic number for file holding an implementation syntax tree

       valcmxs_magic_number : string

       Magic number for dynamically-loadable plugins

       valcmt_magic_number : string

       Magic number for compiled interface files

       vallinear_magic_number : string

       Magic number for Linear internal representation files

       valmax_tag : int

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

       vallazy_tag : int

       Normally the same as Obj.lazy_tag.  Separate definition because of technical reasons for bootstrapping.

       valmax_young_wosize : int

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

       valstack_threshold : int

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

       valstack_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.

       valnative_compiler : bool

       Whether the native compiler is available or not

       Since 5.1

       valarchitecture : string

       Name of processor type for the native-code compiler

       valmodel : string

       Name of processor submodel for the native-code compiler

       valsystem : string

       Name of operating system for the native-code compiler

       valasm : string

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

       valasm_cfi_supported : bool

       Whether assembler understands CFI directives

       valwith_frame_pointers : bool

       Whether assembler should maintain frame pointers

       valext_obj : string

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

       valext_asm : string

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

       valext_lib : string

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

       valext_dll : string

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

       valext_exe : string

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

       Since 4.12

       valdefault_executable_name : string

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

       valsysthread_supported : bool

       Whether the system thread library is implemented

       valflexdll_dirs : stringlist

       Directories needed for the FlexDLL objects

       valhost : string

       Whether the compiler is a cross-compiler

       valtarget : string

       Whether the compiler is a cross-compiler

       valflambda : bool

       Whether the compiler was configured for flambda

       valwith_flambda_invariants : bool

       Whether the invariants checks for flambda are enabled

       valwith_cmm_invariants : bool

       Whether the invariants checks for Cmm are enabled

       valreserved_header_bits : int

       How many bits of a block's header are reserved

       valflat_float_array : bool

       Whether the compiler and runtime automagically flatten float arrays

       valfunction_sections : bool

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

       valwindows_unicode : bool

       Whether Windows Unicode runtime is enabled

       valnaked_pointers : bool

       Whether the runtime supports naked pointers

       Since 4.14

       valsupports_shared_libraries : bool

       Whether shared libraries are supported

       Since 4.08

       valnative_dynlink : bool

       Whether native shared libraries are supported

       Since 5.1

       valafl_instrument : bool

       Whether afl-fuzz instrumentation is generated by default

       valar_supports_response_files : bool

       Whether ar supports @FILE arguments.

       valtsan : bool

       Whether ThreadSanitizer instrumentation is enabled

       valprint_config : out_channel->unit

       Access to configuration values

       valconfig_var : string->stringoption

       the configuration value of a variable, if it exists

OCamldoc                                           2025-06-12                                    Config_main(3o)

Module

       Module   Config_main

Name

       Config_main - System configuration

See Also