forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdune
230 lines (199 loc) · 6.53 KB
/
dune
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
;**************************************************************************
;* *
;* OCaml *
;* *
;* Thomas Refis, Jane Street Europe *
;* *
;* Copyright 2018 Jane Street Group LLC *
;* *
;* 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. *
;* *
;**************************************************************************
;; "perf" has warnings-as-errors + cross-module inlining
(env
(perf
(flags (
-w +a-4-9-40-41-42-44-45-48 -strict-sequence
-strict-formats -short-paths -keep-locs -warn-error +a
)
))
(dev (flags (:standard -w +a-4-9-40-41-42-44-45-48)))
(release (flags (:standard -w +a-4-9-40-41-42-44-45-48))))
;; Too annoying to get to work. Use (copy_files# ...) instead
; (include_subdirs unqualified)
; (ignored_subdirs (lex yacc testsuite ocamldoc ocamltest toplevel otherlibs))
(copy_files# utils/*.ml{,i})
(copy_files# parsing/*.ml{,i})
(copy_files# typing/*.ml{,i})
(copy_files# bytecomp/*.ml{,i})
(copy_files# driver/*.ml{,i})
(copy_files# asmcomp/*.ml{,i})
(copy_files# asmcomp/debug/*.ml{,i})
(copy_files# file_formats/*.ml{,i})
(copy_files# lambda/*.ml{,i})
(copy_files# middle_end/*.ml{,i})
(copy_files# middle_end/closure/*.ml{,i})
(library
(name ocamlcommon)
(wrapped false)
(flags (:standard -principal -nostdlib))
(libraries stdlib)
(modules_without_implementation
annot asttypes cmo_format outcometree parsetree)
(modules
;; UTILS
config build_path_prefix_map misc identifiable numbers arg_helper clflags
profile terminfo ccomp warnings consistbl strongly_connected_components
targetint load_path
int_replace_polymorphic_compare
binutils local_store
;; PARSING
location longident docstrings syntaxerr ast_helper camlinternalMenhirLib
parser lexer parse printast pprintast ast_mapper ast_iterator attr_helper
builtin_attributes ast_invariants depend
; manual update: mli only files
asttypes parsetree
;; TYPING
ident path primitive types btype oprint subst predef datarepr
cmi_format persistent_env env type_immediacy
typedtree printtyped ctype printtyp includeclass mtype envaux includecore
tast_iterator tast_mapper cmt_format untypeast includemod
typetexp patterns printpat parmatch stypes typedecl typeopt rec_check
typecore
typeclass typemod typedecl_variance typedecl_properties typedecl_immediacy
typedecl_unboxed typedecl_separability cmt2annot
; manual update: mli only files
annot outcometree
;; lambda/
debuginfo lambda matching printlambda runtimedef simplif switch
translattribute translclass translcore translmod translobj translprim
;; bytecomp/
meta opcodes bytesections dll symtable
;; some of COMP
pparse main_args compenv compmisc makedepend compile_common
; manual update: mli only files
cmo_format
; manual update: this is required.
instruct
))
(library
(name ocamlbytecomp)
(wrapped false)
(flags (:standard -principal -nostdlib))
(libraries stdlib ocamlcommon)
(modules
;; bytecomp/
bytegen bytelibrarian bytelink bytepackager emitcode printinstr
;; driver/
errors compile maindriver
))
(library
(name ocamlmiddleend)
(wrapped false)
(flags (:standard -principal -nostdlib))
(libraries stdlib ocamlcommon flambdadeps flambda)
(modules_without_implementation
cmx_format cmxs_format backend_intf)
(modules
;; file_formats/
cmx_format cmxs_format
;; middle_end/
backend_intf backend_var clambda clambda_primitives
compilenv convert_primitives internal_variable_names
printclambda printclambda_primitives semantics_of_primitives
;; middle_end/closure/
closure closure_middle_end
)
)
(library
(name ocamloptcommon)
(wrapped false)
(flags (:standard -principal -nostdlib))
(libraries stdlib ocamlcommon ocamlmiddleend)
(modules_without_implementation x86_ast)
(modules
arch proc x86_ast x86_proc
reg reg_availability_set reg_with_debug_info
cmm cmmgen_state cmm_helpers printcmm
mach printmach
interval strmatch
)
)
(library
(name ocamloptcomp)
(wrapped false)
(flags (:standard -principal -nostdlib -open Flambda_to_cmm))
(libraries stdlib ocamlcommon ocamlmiddleend ocamloptcommon flambdadeps
flambda flambda_to_cmm)
(modules
;; asmcomp/
afl_instrument asmgen asmlibrarian asmlink asmpackager branch_relaxation
branch_relaxation_intf cmmgen coloring comballoc
CSE CSEgen deadcode domainstate emit emitaux interf linear linearize linscan
linear_format liveness printlinear reload reloadgen schedgen
scheduling selectgen selection spill split
x86_dsl x86_gas x86_masm
;; asmcomp/debug/
compute_ranges_intf available_regs compute_ranges
;; driver/
optcompile opterrors optmaindriver
)
)
;;;;;;;;;;;;;;
;;; ocamlc ;;;
;;;;;;;;;;;;;;
(executable
(name main)
(modes byte)
(flags (:standard -principal -nostdlib -cclib "-I runtime"))
(libraries ocamlbytecomp ocamlcommon runtime stdlib)
(modules main))
(rule
(copy main.exe ocamlc))
;;;;;;;;;;;;;;;;
;;; ocamlopt ;;;
;;;;;;;;;;;;;;;;
(executable
(name optmain)
;;(link_flags (-cclib -lunwind))
(modes native)
(flags (:standard -principal -nostdlib -cclib "-I runtime"))
(libraries ocamloptcomp ocamloptcommon ocamlmiddleend flambda ocamlcommon runtimeopt stdlib)
(modules optmain))
(rule
(copy optmain.exe ocamlopt.opt))
;;;;;;;;;;;;;;;
;;; aliases ;;;
;;;;;;;;;;;;;;;
; mshinwell: The debugger and ocamldoc are currently disabled as Dynlink is
; not built correctly.
(alias
(name world)
(deps ocamlc
ocamlopt.opt
; debugger/ocamldebug.byte
; ocamldoc/ocamldoc.byte
; ocamltest/ocamltest.byte
; toplevel/ocaml.byte
; toplevel/expunge.exe
))
(alias
(name libs)
(deps
ocamloptcomp.cma
ocamlmiddleend.cma
ocamlcommon.cma
runtime/runtime.cma
stdlib/stdlib.cma
ocamlbytecomp.cma
ocamltest/ocamltest_core_and_plugin.cma
toplevel/ocamltoplevel.cma
))
(install
(section bin)
(package ocaml)
(files
(ocamlc as ocamlc)
(ocamlopt.opt as ocamlopt)))