forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dune
48 lines (47 loc) · 2.11 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
;**************************************************************************
;* *
;* 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. *
;* *
;**************************************************************************
(library
(name stdlib)
(stdlib
(exit_module std_exit)
(internal_modules Camlinternal*)
(modules_before_stdlib
camlinternalFormatBasics))
(flags (:standard -w -9 -nolabels))
(preprocess
(per_module
((action
(progn
(run sed -i s/%atomic_load/%identity/ %{input-file})
(run sed -i s/%atomic_cas/%obj_set_field/ %{input-file})
(run awk -f %{dep:expand_module_aliases.awk} %{input-file})))
stdlib)
;; AWFUL HACKS: remove once 5.0 is released
;; (this is needed because we're building with a compiler which doesn't
;; know these primitives yet)
;; It's especially ugly because the compiler insists on checking arity...
((action
(progn
(run sed -i s/%atomic_load/%identity/ %{input-file})
(run sed -i s/%atomic_cas/%obj_set_field/ %{input-file})
(run sed s/%atomic_[a-z_]*/%addint/ %{input-file})))
atomic)
((action (run sed s/%dls_get/%identity/ %{input-file}))
domain)
((action
(progn
(run sed -i s/%perform/%identity/ %{input-file})
(run sed s/%r[a-z]*/%obj_set_field/ %{input-file})))
effect)
)))