| 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-66-67-70))) |
| 17 |
(release (flags (:standard -w +a-4-9-40-41-42-44-45-48-66-67-70)))) |
| 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# file_formats/*.ml{,i}) |
| 30 |
(copy_files# lambda/*.ml{,i}) |
| 31 |
(copy_files# middle_end/*.ml{,i}) |
| 32 |
(copy_files# middle_end/closure/*.ml{,i}) |
| 33 |
(copy_files# middle_end/flambda/*.ml{,i}) |
| 34 |
(copy_files# middle_end/flambda/base_types/*.ml{,i}) |
| 35 |
|
| 36 |
(library |
| 37 |
(name ocamlcommon) |
| 38 |
(wrapped false) |
| 39 |
(flags (:standard -principal -nostdlib \ -short-paths)) |
| 40 |
(libraries stdlib) |
| 41 |
(modules_without_implementation |
| 42 |
annot cmo_format outcometree parsetree value_rec_types) |
| 43 |
(modules |
| 44 |
;; UTILS |
| 45 |
config build_path_prefix_map misc identifiable numbers arg_helper |
| 46 |
clflags profile terminfo ccomp format_doc warnings consistbl |
| 47 |
strongly_connected_components targetint load_path |
| 48 |
int_replace_polymorphic_compare binutils local_store lazy_backtrack diffing |
| 49 |
diffing_with_keys unit_info compression linkdeps |
| 50 |
|
| 51 |
;; PARSING |
| 52 |
location longident docstrings syntaxerr ast_helper camlinternalMenhirLib |
| 53 |
ast_iterator builtin_attributes parser lexer parse printast pprintast |
| 54 |
ast_mapper attr_helper ast_invariants depend |
| 55 |
; manual update: mli only files |
| 56 |
asttypes parsetree |
| 57 |
|
| 58 |
;; TYPING |
| 59 |
ident path primitive shape shape_reduce types btype oprint subst predef |
| 60 |
datarepr cmi_format persistent_env env type_immediacy errortrace |
| 61 |
typedtree printtyped ctype printtyp rawprinttyp includeclass mtype envaux |
| 62 |
includecore tast_iterator tast_mapper signature_group cmt_format untypeast |
| 63 |
includemod includemod_errorprinter errortrace_report |
| 64 |
typetexp patterns printpat parmatch stypes typeopt typedecl value_rec_check |
| 65 |
typecore |
| 66 |
typeclass typemod typedecl_variance typedecl_properties typedecl_immediacy |
| 67 |
typedecl_unboxed typedecl_separability cmt2annot out_type data_types |
| 68 |
; manual update: mli only files |
| 69 |
annot outcometree value_rec_types |
| 70 |
|
| 71 |
;; lambda/ |
| 72 |
debuginfo lambda matching printlambda runtimedef tmc simplif switch |
| 73 |
translattribute translclass translcore translmod translobj translprim |
| 74 |
value_rec_compiler |
| 75 |
|
| 76 |
;; bytecomp/ |
| 77 |
meta opcodes bytesections dll symtable |
| 78 |
|
| 79 |
;; some of COMP |
| 80 |
pparse main_args compenv compmisc makedepend compile_common |
| 81 |
; manual update: mli only files |
| 82 |
cmo_format |
| 83 |
; manual update: this is required. |
| 84 |
instruct |
| 85 |
)) |
| 86 |
|
| 87 |
(library |
| 88 |
(name ocamlbytecomp) |
| 89 |
(wrapped false) |
| 90 |
(flags (:standard -principal -nostdlib)) |
| 91 |
(libraries stdlib ocamlcommon) |
| 92 |
(modules |
| 93 |
;; bytecomp/ |
| 94 |
bytegen bytelibrarian bytelink bytepackager emitcode printinstr |
| 95 |
|
| 96 |
;; driver/ |
| 97 |
errors compile maindriver |
| 98 |
)) |
| 99 |
|
| 100 |
(library |
| 101 |
(name ocamlmiddleend) |
| 102 |
(wrapped false) |
| 103 |
(flags (:standard -principal -nostdlib)) |
| 104 |
(libraries stdlib ocamlcommon) |
| 105 |
(modules_without_implementation |
| 106 |
cmx_format cmxs_format backend_intf inlining_decision_intf |
| 107 |
simplify_boxed_integer_ops_intf) |
| 108 |
(modules |
| 109 |
;; file_formats/ |
| 110 |
cmx_format cmxs_format |
| 111 |
|
| 112 |
;; middle_end/ |
| 113 |
backend_intf backend_var backend_var clambda clambda_primitives |
| 114 |
compilation_unit compilenv convert_primitives internal_variable_names |
| 115 |
linkage_name printclambda printclambda_primitives semantics_of_primitives |
| 116 |
symbol variable |
| 117 |
|
| 118 |
;; middle_end/closure/ |
| 119 |
closure closure_middle_end |
| 120 |
|
| 121 |
;; middle_end/flambda/base_types/ |
| 122 |
closure_element closure_id closure_origin export_id id_types mutable_variable |
| 123 |
set_of_closures_id set_of_closures_origin static_exception tag |
| 124 |
var_within_closure |
| 125 |
|
| 126 |
;; middle_end/flambda/ |
| 127 |
alias_analysis allocated_const augment_specialised_args build_export_info |
| 128 |
closure_conversion closure_conversion_aux closure_offsets effect_analysis |
| 129 |
export_info export_info_for_pack extract_projections find_recursive_functions |
| 130 |
flambda flambda_invariants flambda_iterators flambda_middle_end |
| 131 |
flambda_to_clambda flambda_utils freshening import_approx inconstant_idents |
| 132 |
initialize_symbol_to_let_symbol inline_and_simplify inline_and_simplify_aux |
| 133 |
inlining_cost inlining_decision inlining_decision_intf inlining_stats |
| 134 |
inlining_stats_types inlining_transforms invariant_params lift_code |
| 135 |
lift_constants lift_let_to_initialize_symbol parameter pass_wrapper |
| 136 |
projection ref_to_variables remove_free_vars_equal_to_args |
| 137 |
remove_unused_arguments remove_unused_closure_vars |
| 138 |
remove_unused_program_constructs share_constants simple_value_approx |
| 139 |
simplify_boxed_integer_ops simplify_boxed_integer_ops_intf simplify_common |
| 140 |
simplify_primitives traverse_for_exported_symbols un_anf unbox_closures |
| 141 |
unbox_free_vars_of_closures unbox_specialised_args |
| 142 |
) |
| 143 |
) |
| 144 |
|
| 145 |
(library |
| 146 |
(name ocamloptcomp) |
| 147 |
(wrapped false) |
| 148 |
(flags (:standard -principal -nostdlib)) |
| 149 |
(libraries stdlib ocamlcommon ocamlmiddleend) |
| 150 |
(modules_without_implementation x86_ast emitenv branch_relaxation_intf) |
| 151 |
(modules |
| 152 |
;; asmcomp/ |
| 153 |
afl_instrument arch asmgen asmlibrarian asmlink asmpackager branch_relaxation |
| 154 |
branch_relaxation_intf cmm_helpers cmm cmmgen cmmgen_state coloring comballoc |
| 155 |
cmm_invariants |
| 156 |
CSE CSEgen |
| 157 |
dataflow deadcode domainstate |
| 158 |
emit emitaux emitenv |
| 159 |
interf interval |
| 160 |
linear linearize linscan |
| 161 |
liveness mach |
| 162 |
polling printcmm printlinear printmach proc |
| 163 |
reg reload reloadgen |
| 164 |
schedgen scheduling selectgen selection spill split |
| 165 |
strmatch thread_sanitizer x86_ast x86_dsl x86_gas x86_masm x86_proc |
| 166 |
stackframegen stackframe |
| 167 |
|
| 168 |
;; file_formats/ |
| 169 |
linear_format |
| 170 |
|
| 171 |
;; driver/ |
| 172 |
optcompile opterrors optmaindriver |
| 173 |
) |
| 174 |
) |
| 175 |
|
| 176 |
;;;;;;;;;;;;;; |
| 177 |
;;; ocamlc ;;; |
| 178 |
;;;;;;;;;;;;;; |
| 179 |
|
| 180 |
(executable |
| 181 |
(name main) |
| 182 |
(modes byte) |
| 183 |
(flags (:standard -principal -nostdlib)) |
| 184 |
(libraries ocamlbytecomp ocamlcommon runtime stdlib) |
| 185 |
(modules main)) |
| 186 |
|
| 187 |
(rule |
| 188 |
(copy main.exe ocamlc.byte)) |
| 189 |
|
| 190 |
;;;;;;;;;;;;;;;; |
| 191 |
;;; ocamlopt ;;; |
| 192 |
;;;;;;;;;;;;;;;; |
| 193 |
|
| 194 |
(executable |
| 195 |
(name optmain) |
| 196 |
(modes byte) |
| 197 |
(flags (:standard -principal -nostdlib)) |
| 198 |
(libraries ocamloptcomp ocamlmiddleend ocamlcommon runtime stdlib) |
| 199 |
(modules optmain)) |
| 200 |
|
| 201 |
(rule |
| 202 |
(copy optmain.exe ocamlopt.byte)) |
| 203 |
|
| 204 |
;;;;;;;;;;;;;;; |
| 205 |
;;; aliases ;;; |
| 206 |
;;;;;;;;;;;;;;; |
| 207 |
|
| 208 |
; mshinwell: The debugger and ocamldoc are currently disabled as Dynlink is |
| 209 |
; not built correctly. |
| 210 |
(alias |
| 211 |
(name world) |
| 212 |
(deps ocamlc.byte |
| 213 |
ocamlopt.byte |
| 214 |
; debugger/ocamldebug.byte |
| 215 |
; ocamldoc/ocamldoc.byte |
| 216 |
ocamltest/ocamltest.byte |
| 217 |
toplevel/ocaml.byte |
| 218 |
toplevel/expunge.exe |
| 219 |
)) |
| 220 |
|
| 221 |
(alias |
| 222 |
(name libs) |
| 223 |
(deps |
| 224 |
ocamloptcomp.cma |
| 225 |
ocamlmiddleend.cma |
| 226 |
ocamlcommon.cma |
| 227 |
runtime/runtime.cma |
| 228 |
stdlib/stdlib.cma |
| 229 |
ocamlbytecomp.cma |
| 230 |
ocamltest/ocamltest_core_and_plugin.cma |
| 231 |
toplevel/ocamltoplevel.cma |
| 232 |
)) |