1 ;**************************************************************************
2 ;* *
3 ;* OCaml *
4 ;* *
5 ;* Thomas Refis, Jane Street Europe *
6 ;* *
7 ;* Copyright 2018 Jane Street Group LLC *
8 ;* *
9 ;* All rights reserved. This file is distributed under the terms of *
10 ;* the GNU Lesser General Public License version 2.1, with the *
11 ;* special exception on linking described in the file LICENSE. *
12 ;* *
13 ;**************************************************************************
14
15 (env
16 (dev (flags (:standard -w +a-4-9-40-41-42-44-45-48)))
17 (release (flags (:standard -w +a-4-9-40-41-42-44-45-48))))
18
19 ;; Too annoying to get to work. Use (copy_files# ...) instead
20 ; (include_subdirs unqualified)
21 ; (ignored_subdirs (lex yacc testsuite ocamldoc ocamltest toplevel otherlibs))
22
23 (copy_files# utils/*.ml{,i})
24 (copy_files# parsing/*.ml{,i})
25 (copy_files# typing/*.ml{,i})
26 (copy_files# bytecomp/*.ml{,i})
27 (copy_files# driver/*.ml{,i})
28 (copy_files# asmcomp/*.ml{,i})
29 (copy_files# asmcomp/debug/*.ml{,i})
30 (copy_files# file_formats/*.ml{,i})
31 (copy_files# lambda/*.ml{,i})
32 (copy_files# middle_end/*.ml{,i})
33 (copy_files# middle_end/closure/*.ml{,i})
34 (copy_files# middle_end/flambda/*.ml{,i})
35 (copy_files# middle_end/flambda/base_types/*.ml{,i})
36
37 (library
38 (name ocamlcommon)
39 (wrapped false)
40 (flags (:standard -principal -nostdlib))
41 (libraries stdlib)
42 (modules_without_implementation
43 annot asttypes cmo_format outcometree parsetree)
44 (modules
45 ;; UTILS
46 config build_path_prefix_map misc identifiable numbers arg_helper clflags
47 profile terminfo ccomp warnings consistbl strongly_connected_components
48 targetint load_path int_replace_polymorphic_compare
49
50 ;; PARSING
51 location longident docstrings syntaxerr ast_helper camlinternalMenhirLib
52 parser lexer parse printast pprintast ast_mapper ast_iterator attr_helper
53 builtin_attributes ast_invariants depend
54 ; manual update: mli only files
55 asttypes parsetree
56
57 ;; TYPING
58 ident path primitive types btype oprint subst predef datarepr
59 cmi_format persistent_env env type_immediacy
60 typedtree printtyped ctype printtyp includeclass mtype envaux includecore
61 tast_iterator tast_mapper cmt_format untypeast includemod
62 typetexp printpat parmatch stypes typedecl typeopt rec_check typecore
63 typeclass typemod typedecl_variance typedecl_properties typedecl_immediacy
64 typedecl_unboxed
65 ; manual update: mli only files
66 annot outcometree
67
68 ;; lambda/
69 debuginfo lambda matching printlambda runtimedef simplif switch
70 translattribute translclass translcore translmod translobj translprim
71
72 ;; bytecomp/
73 meta opcodes bytesections dll symtable
74
75 ;; some of COMP
76 pparse main_args compenv compmisc makedepend compile_common
77 ; manual update: mli only files
78 cmo_format
79 ; manual update: this is required.
80 instruct
81 ))
82
83 (library
84 (name ocamlbytecomp)
85 (wrapped false)
86 (flags (:standard -principal -nostdlib))
87 (libraries stdlib ocamlcommon)
88 (modules
89 ;; bytecomp/
90 bytegen bytelibrarian bytelink bytepackager emitcode printinstr
91
92 ;; driver/
93 errors compile
94 ))
95
96 (library
97 (name ocamlmiddleend)
98 (wrapped false)
99 (flags (:standard -principal -nostdlib))
100 (libraries stdlib ocamlcommon)
101 (modules_without_implementation
102 cmx_format cmxs_format backend_intf inlining_decision_intf
103 simplify_boxed_integer_ops_intf)
104 (modules
105 ;; file_formats/
106 cmx_format cmxs_format
107
108 ;; middle_end/
109 backend_intf backend_var backend_var clambda clambda_primitives
110 compilation_unit compilenv convert_primitives internal_variable_names
111 linkage_name printclambda printclambda_primitives semantics_of_primitives
112 symbol variable
113
114 ;; middle_end/closure/
115 closure closure_middle_end
116
117 ;; middle_end/flambda/base_types/
118 closure_element closure_id closure_origin export_id id_types mutable_variable
119 set_of_closures_id set_of_closures_origin static_exception tag
120 var_within_closure
121
122 ;; middle_end/flambda/
123 alias_analysis allocated_const augment_specialised_args build_export_info
124 closure_conversion closure_conversion_aux closure_offsets effect_analysis
125 export_info export_info_for_pack extract_projections find_recursive_functions
126 flambda flambda_invariants flambda_iterators flambda_middle_end
127 flambda_to_clambda flambda_utils freshening import_approx inconstant_idents
128 initialize_symbol_to_let_symbol inline_and_simplify inline_and_simplify_aux
129 inlining_cost inlining_decision inlining_decision_intf inlining_stats
130 inlining_stats_types inlining_transforms invariant_params lift_code
131 lift_constants lift_let_to_initialize_symbol parameter pass_wrapper
132 projection ref_to_variables remove_free_vars_equal_to_args
133 remove_unused_arguments remove_unused_closure_vars
134 remove_unused_program_constructs share_constants simple_value_approx
135 simplify_boxed_integer_ops simplify_boxed_integer_ops_intf simplify_common
136 simplify_primitives traverse_for_exported_symbols un_anf unbox_closures
137 unbox_free_vars_of_closures unbox_specialised_args
138 )
139 )
140
141 (library
142 (name ocamloptcomp)
143 (wrapped false)
144 (flags (:standard -principal -nostdlib))
145 (libraries stdlib ocamlcommon ocamlmiddleend)
146 (modules_without_implementation x86_ast)
147 (modules
148 ;; asmcomp/
149 afl_instrument arch asmgen asmlibrarian asmlink asmpackager branch_relaxation
150 branch_relaxation_intf cmm_helpers cmm cmmgen cmmgen_state coloring comballoc
151 CSE CSEgen
152 deadcode domainstate emit emitaux interf interval linear linearize linscan
153 liveness mach printcmm printlinear printmach proc reg reload reloadgen
154 schedgen scheduling selectgen selection spacetime_profiling spill split
155 strmatch x86_ast x86_dsl x86_gas x86_masm x86_proc
156
157 ;; asmcomp/debug/
158 reg_availability_set compute_ranges_intf available_regs reg_with_debug_info
159 compute_ranges
160
161 ;; driver/
162 optcompile opterrors
163 )
164 )
165
166 ;;;;;;;;;;;;;;
167 ;;; ocamlc ;;;
168 ;;;;;;;;;;;;;;
169
170 (executable
171 (name main)
172 (modes byte)
173 (flags (:standard -principal -nostdlib))
174 (libraries ocamlbytecomp ocamlcommon runtime stdlib)
175 (modules main))
176
177 (rule
178 (copy main.exe ocamlc.byte))
179
180 ;;;;;;;;;;;;;;;;
181 ;;; ocamlopt ;;;
182 ;;;;;;;;;;;;;;;;
183
184 (executable
185 (name optmain)
186 (modes byte)
187 (flags (:standard -principal -nostdlib))
188 (libraries ocamloptcomp ocamlmiddleend ocamlcommon runtime stdlib)
189 (modules optmain))
190
191 (rule
192 (copy optmain.exe ocamlopt.byte))
193
194 ;;;;;;;;;;;;;;;
195 ;;; aliases ;;;
196 ;;;;;;;;;;;;;;;
197
198 ; mshinwell: The debugger and ocamldoc are currently disabled as Dynlink is
199 ; not built correctly.
200 (alias
201 (name world)
202 (deps ocamlc.byte
203 ocamlopt.byte
204 ; debugger/ocamldebug.byte
205 ; ocamldoc/ocamldoc.byte
206 ocamltest/ocamltest.byte
207 toplevel/ocaml.byte
208 toplevel/expunge.exe
209 ))
210
211 (alias
212 (name libs)
213 (deps
214 ocamloptcomp.cma
215 ocamlmiddleend.cma
216 ocamlcommon.cma
217 runtime/runtime.cma
218 stdlib/stdlib.cma
219 ocamlbytecomp.cma
220 ocamltest/ocamltest_core_and_plugin.cma
221 toplevel/ocamltoplevel.cma
222 ))
223