summaryrefslogtreecommitdiff
path: root/utils/config.generated.ml.in
blob: af25f2ca1dbcfccd0ba5e6f0b701247f6bae54bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
(* @configure_input@ *)
#2 "utils/config.generated.ml.in"
(**************************************************************************)
(*                                                                        *)
(*                                 OCaml                                  *)
(*                                                                        *)
(*             Xavier Leroy, projet Cristal, INRIA Rocquencourt           *)
(*                                                                        *)
(*   Copyright 1996 Institut National de Recherche en Informatique et     *)
(*     en Automatique.                                                    *)
(*                                                                        *)
(*   All rights reserved.  This file is distributed under the terms of    *)
(*   the GNU Lesser General Public License version 2.1, with the          *)
(*   special exception on linking described in the file LICENSE.          *)
(*                                                                        *)
(**************************************************************************)

(* This file is included in config_main.ml during the build rather
   than compiled on its own *)

let bindir = {@QS@|@ocaml_bindir@|@QS@}

let standard_library_default = {@QS@|@ocaml_libdir@|@QS@}

let ccomp_type = {@QS@|@ccomptype@|@QS@}
let c_compiler = {@QS@|@CC@|@QS@}
let c_output_obj = {@QS@|@outputobj@|@QS@}
let c_has_debug_prefix_map = @cc_has_debug_prefix_map@
let as_has_debug_prefix_map = @as_has_debug_prefix_map@
let ocamlc_cflags = {@QS@|@ocamlc_cflags@|@QS@}
let ocamlc_cppflags = {@QS@|@ocamlc_cppflags@|@QS@}
(* #7678: ocamlopt uses these only to compile .c files, and the behaviour for
          the two drivers should be identical. *)
let ocamlopt_cflags = {@QS@|@ocamlc_cflags@|@QS@}
let ocamlopt_cppflags = {@QS@|@ocamlc_cppflags@|@QS@}
let bytecomp_c_libraries = {@QS@|@bytecclibs@|@QS@}
(* bytecomp_c_compiler and native_c_compiler have been supported for a
   long time and are retained for backwards compatibility.
   For programs that don't need compatibility with older OCaml releases
   the recommended approach is to use the constituent variables
   c_compiler, ocamlc_cflags, ocamlc_cppflags etc., directly.
*)
let bytecomp_c_compiler =
  c_compiler ^ " " ^ ocamlc_cflags ^ " " ^ ocamlc_cppflags
let native_c_compiler =
  c_compiler ^ " " ^ ocamlopt_cflags ^ " " ^ ocamlopt_cppflags
let native_c_libraries = {@QS@|@nativecclibs@|@QS@}
let native_pack_linker = {@QS@|@PACKLD@|@QS@}
let default_rpath = {@QS@|@rpath@|@QS@}
let mksharedlibrpath = {@QS@|@mksharedlibrpath@|@QS@}
let ar = {@QS@|@AR@|@QS@}
let supports_shared_libraries = @supports_shared_libraries@
let mkdll, mkexe, mkmaindll =
  if Sys.win32 || Sys.cygwin && supports_shared_libraries then
    let flexlink =
      let flexlink =
        Option.value ~default:"flexlink" (Sys.getenv_opt "OCAML_FLEXLINK")
      in
      let f i =
        let c = flexlink.[i] in
        if c = '/' && Sys.win32 then '\\' else c
      in
      String.init (String.length flexlink) f
    in
    let flexdll_chain = {@QS@|@flexdll_chain@|@QS@} in
    let flexlink_flags = {@QS@|@flexlink_flags@|@QS@} in
    let flags = " -chain " ^ flexdll_chain ^ " " ^ flexlink_flags in
    flexlink ^ flags ^ {@QS@|@mkdll_ldflags_exp@|@QS@},
    flexlink ^ " -exe" ^ flags
      ^ {@QS@| @mkexe_extra_flags@|@QS@} ^ {@QS@|@mkexe_ldflags_exp@|@QS@},
    flexlink ^ " -maindll" ^ flags ^ {@QS@|@mkdll_ldflags_exp@|@QS@}
  else
    {@QS@|@mkdll_exp@|@QS@},
    {@QS@|@mkexe_exp@|@QS@},
    {@QS@|@mkmaindll_exp@|@QS@}

let flambda = @flambda@
let with_flambda_invariants = @flambda_invariants@
let with_cmm_invariants = @cmm_invariants@
let windows_unicode = @windows_unicode@ != 0
let force_instrumented_runtime = @force_instrumented_runtime@

let flat_float_array = @flat_float_array@

let function_sections = @function_sections@
let afl_instrument = @afl@

let architecture = {@QS@|@arch@|@QS@}
let model = {@QS@|@model@|@QS@}
let system = {@QS@|@system@|@QS@}

let asm = {@QS@|@AS@|@QS@}
let asm_cfi_supported = @asm_cfi_supported@
let with_frame_pointers = @frame_pointers@
let profinfo = @profinfo@
let profinfo_width = @profinfo_width@

let ext_exe = {@QS@|@exeext@|@QS@}
let ext_obj = "." ^ {@QS@|@OBJEXT@|@QS@}
let ext_asm = "." ^ {@QS@|@S@|@QS@}
let ext_lib = "." ^ {@QS@|@libext@|@QS@}
let ext_dll = "." ^ {@QS@|@SO@|@QS@}

let host = {@QS@|@host@|@QS@}
let target = {@QS@|@target@|@QS@}

let systhread_supported = @systhread_support@

let flexdll_dirs = [@flexdll_dir@]